[ovs-dev] [netdev 1/6] netdev: Remove netdev_exists(), which has no users.
Ethan Jackson
ethan at nicira.com
Fri Mar 22 20:20:36 UTC 2013
Acked-by: Ethan Jackson <ethan at nicira.com>
On Fri, Mar 15, 2013 at 3:55 PM, Ben Pfaff <blp at nicira.com> wrote:
> Signed-off-by: Ben Pfaff <blp at nicira.com>
> ---
> lib/netdev.c | 21 ---------------------
> lib/netdev.h | 1 -
> 2 files changed, 0 insertions(+), 22 deletions(-)
>
> diff --git a/lib/netdev.c b/lib/netdev.c
> index e338d7c..77080ea 100644
> --- a/lib/netdev.c
> +++ b/lib/netdev.c
> @@ -320,27 +320,6 @@ netdev_close(struct netdev *netdev)
> }
> }
>
> -/* Returns true if a network device named 'name' exists and may be opened,
> - * otherwise false. */
> -bool
> -netdev_exists(const char *name)
> -{
> - struct netdev *netdev;
> - int error;
> -
> - error = netdev_open(name, "system", &netdev);
> - if (!error) {
> - netdev_close(netdev);
> - return true;
> - } else {
> - if (error != ENODEV) {
> - VLOG_WARN("failed to open network device %s: %s",
> - name, strerror(error));
> - }
> - return false;
> - }
> -}
> -
> /* Returns true if a network device named 'name' is currently opened,
> * otherwise false. */
> bool
> diff --git a/lib/netdev.h b/lib/netdev.h
> index 13105ee..425942f 100644
> --- a/lib/netdev.h
> +++ b/lib/netdev.h
> @@ -114,7 +114,6 @@ void netdev_enumerate_types(struct sset *types);
> int netdev_open(const char *name, const char *type, struct netdev **);
> void netdev_close(struct netdev *);
>
> -bool netdev_exists(const char *name);
> bool netdev_is_open(const char *name);
>
> void netdev_parse_name(const char *netdev_name, char **name, char **type);
> --
> 1.7.2.5
>
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openvswitch.org/pipermail/ovs-dev/attachments/20130322/0ff8a02f/attachment-0003.html>
More information about the dev
mailing list