[ovs-dev] [uswitch 4/4] dpif-linux: Avoid logging error on ENOENT in dpif_linux_is_internal_device().

Ben Pfaff blp at nicira.com
Fri Apr 8 23:41:07 UTC 2011


ENOENT can be returned if the kernel module isn't loaded.  If that's the
case then we've already logged that and there's no point in logging it
again.
---
 lib/dpif-linux.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lib/dpif-linux.c b/lib/dpif-linux.c
index a7823b8..fa8eea6 100644
--- a/lib/dpif-linux.c
+++ b/lib/dpif-linux.c
@@ -1072,7 +1072,7 @@ dpif_linux_is_internal_device(const char *name)
     error = dpif_linux_vport_get(name, &reply, &buf);
     if (!error) {
         ofpbuf_delete(buf);
-    } else if (error != ENODEV) {
+    } else if (error != ENODEV && error != ENOENT) {
         VLOG_WARN_RL(&error_rl, "%s: vport query failed (%s)",
                      name, strerror(error));
     }
-- 
1.7.1




More information about the dev mailing list