diff options
author | Thomas Graf <tgraf@suug.ch> | 2014-08-25 23:09:08 (GMT) |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2014-08-26 11:03:30 (GMT) |
commit | da80033c2f0c6037794721bd9ad36237e6d2ccca (patch) | |
tree | c61f24136a1b63d86567ba3b33f2bf402044080f /lib/netfilter | |
parent | 03f3f3c4c0f0a6136a3c30a1e554a53c0a6f3a06 (diff) | |
download | libnl-da80033c2f0c6037794721bd9ad36237e6d2ccca.zip libnl-da80033c2f0c6037794721bd9ad36237e6d2ccca.tar.gz libnl-da80033c2f0c6037794721bd9ad36237e6d2ccca.tar.bz2 |
nf: nfnl_*_str2copy_mode() should return int
... to be able to return a negative error code for unknown modes.
[thaller@redhat.com: This is potentially an ABI break, but since
the size of the enum is implementation defined, it seems
anyway unstable to have them as function arguments/return values.]
http://lists.infradead.org/pipermail/libnl/2014-August/001616.html
Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Thomas Haller <thaller@redhat.com>
Diffstat (limited to 'lib/netfilter')
-rw-r--r-- | lib/netfilter/log_obj.c | 2 | ||||
-rw-r--r-- | lib/netfilter/queue_obj.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/netfilter/log_obj.c b/lib/netfilter/log_obj.c index 5e1bf9e..3fdb347 100644 --- a/lib/netfilter/log_obj.c +++ b/lib/netfilter/log_obj.c @@ -69,7 +69,7 @@ char *nfnl_log_copy_mode2str(enum nfnl_log_copy_mode copy_mode, char *buf, ARRAY_SIZE(copy_modes)); } -enum nfnl_log_copy_mode nfnl_log_str2copy_mode(const char *name) +int nfnl_log_str2copy_mode(const char *name) { return __str2type(name, copy_modes, ARRAY_SIZE(copy_modes)); } diff --git a/lib/netfilter/queue_obj.c b/lib/netfilter/queue_obj.c index b51f5ec..36ed3c5 100644 --- a/lib/netfilter/queue_obj.c +++ b/lib/netfilter/queue_obj.c @@ -65,7 +65,7 @@ char *nfnl_queue_copy_mode2str(enum nfnl_queue_copy_mode copy_mode, char *buf, ARRAY_SIZE(copy_modes)); } -enum nfnl_queue_copy_mode nfnl_queue_str2copy_mode(const char *name) +int nfnl_queue_str2copy_mode(const char *name) { return __str2type(name, copy_modes, ARRAY_SIZE(copy_modes)); } |