diff options
author | Felix Fietkau <nbd@openwrt.org> | 2014-12-10 16:02:49 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2014-12-10 16:02:49 +0000 |
commit | e52bfb0ef0e1e2d08892e9401fd2510ecdf403dc (patch) | |
tree | fa4ba380dc1d56eb83a526c84d4fbcc117fecc12 /package/libs/libnl-tiny/src/genl_mngt.c | |
parent | b689b5cb8ac3e67e663a3a4b0cf17ba8f334d052 (diff) | |
download | master-187ad058-e52bfb0ef0e1e2d08892e9401fd2510ecdf403dc.tar.gz master-187ad058-e52bfb0ef0e1e2d08892e9401fd2510ecdf403dc.tar.bz2 master-187ad058-e52bfb0ef0e1e2d08892e9401fd2510ecdf403dc.zip |
libnl-tiny: remove dead code
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43599 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/libs/libnl-tiny/src/genl_mngt.c')
-rw-r--r-- | package/libs/libnl-tiny/src/genl_mngt.c | 81 |
1 files changed, 0 insertions, 81 deletions
diff --git a/package/libs/libnl-tiny/src/genl_mngt.c b/package/libs/libnl-tiny/src/genl_mngt.c index 6c651796cb..246521f696 100644 --- a/package/libs/libnl-tiny/src/genl_mngt.c +++ b/package/libs/libnl-tiny/src/genl_mngt.c @@ -136,31 +136,6 @@ errout: } -#ifdef disabled -char *genl_op2name(int family, int op, char *buf, size_t len) -{ - struct genl_ops *ops; - int i; - - nl_list_for_each_entry(ops, &genl_ops_list, o_list) { - if (ops->o_family == family) { - for (i = 0; i < ops->o_ncmds; i++) { - struct genl_cmd *cmd; - cmd = &ops->o_cmds[i]; - - if (cmd->c_id == op) { - strncpy(buf, cmd->c_name, len - 1); - return buf; - } - } - } - } - - strncpy(buf, "unknown", len - 1); - return NULL; -} -#endif - /** * @name Register/Unregister * @{ @@ -215,60 +190,4 @@ void genl_unregister(struct nl_cache_ops *ops) /** @} */ -/** - * @name Resolving ID/Name - * @{ - */ -#ifdef disabled -static int __genl_ops_resolve(struct nl_cache *ctrl, struct genl_ops *ops) -{ - struct genl_family *family; - - family = genl_ctrl_search_by_name(ctrl, ops->o_name); - if (family != NULL) { - ops->o_id = genl_family_get_id(family); - genl_family_put(family); - - return 0; - } - - return -NLE_OBJ_NOTFOUND; -} - -int genl_ops_resolve(struct nl_sock *sk, struct genl_ops *ops) -{ - struct nl_cache *ctrl; - int err; - - if ((err = genl_ctrl_alloc_cache(sk, &ctrl)) < 0) - goto errout; - - err = __genl_ops_resolve(ctrl, ops); - - nl_cache_free(ctrl); -errout: - return err; -} - -int genl_mngt_resolve(struct nl_sock *sk) -{ - struct nl_cache *ctrl; - struct genl_ops *ops; - int err = 0; - - if ((err = genl_ctrl_alloc_cache(sk, &ctrl)) < 0) - goto errout; - - nl_list_for_each_entry(ops, &genl_ops_list, o_list) { - err = __genl_ops_resolve(ctrl, ops); - } - - nl_cache_free(ctrl); -errout: - return err; -} -#endif -/** @} */ - - /** @} */ |