diff options
| author | Patrick McHardy <kaber@trash.net> | 2010-03-08 12:55:23 +0100 |
|---|---|---|
| committer | Patrick McHardy <kaber@trash.net> | 2010-03-08 12:55:23 +0100 |
| commit | f790c0ca6fad60b544bb73eda8cc841a6436725b (patch) | |
| tree | 171052d4734fda5e77668aacfff98de69e1f4237 /include/linux/range.h | |
| parent | 9ab48ddcb144fdee908708669448dd136cf4894a (diff) | |
| parent | 25cf84cf377c0aae5dbcf937ea89bc7893db5176 (diff) | |
Merge branch 'master' of /repos/git/linux-2.6
Conflicts:
net/ipv4/netfilter/nf_nat_core.c
net/netfilter/nf_conntrack_core.c
net/netfilter/nf_conntrack_netlink.c
Signed-off-by: Patrick McHardy <kaber@trash.net>
Diffstat (limited to 'include/linux/range.h')
| -rw-r--r-- | include/linux/range.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/include/linux/range.h b/include/linux/range.h new file mode 100644 index 000000000000..bd184a5db791 --- /dev/null +++ b/include/linux/range.h @@ -0,0 +1,30 @@ +#ifndef _LINUX_RANGE_H +#define _LINUX_RANGE_H + +struct range { + u64 start; + u64 end; +}; + +int add_range(struct range *range, int az, int nr_range, + u64 start, u64 end); + + +int add_range_with_merge(struct range *range, int az, int nr_range, + u64 start, u64 end); + +void subtract_range(struct range *range, int az, u64 start, u64 end); + +int clean_sort_range(struct range *range, int az); + +void sort_range(struct range *range, int nr_range); + +#define MAX_RESOURCE ((resource_size_t)~0) +static inline resource_size_t cap_resource(u64 val) +{ + if (val > MAX_RESOURCE) + return MAX_RESOURCE; + + return val; +} +#endif |
