netdev: Log a warning when netdev_set_config() fails.
[sliver-openvswitch.git] / utilities / ovs-dpctl.c
index 78475e7..bd99834 100644 (file)
@@ -350,7 +350,6 @@ dpctl_add_if(int argc OVS_UNUSED, char *argv[])
 
         error = netdev_set_config(netdev, &args);
         if (error) {
-            ovs_error(error, "%s: failed to configure network device", name);
             goto next;
         }
 
@@ -459,7 +458,6 @@ dpctl_set_if(int argc, char *argv[])
         error = netdev_set_config(netdev, &args);
         smap_destroy(&args);
         if (error) {
-            ovs_error(error, "%s: failed to configure network device", name);
             goto next;
         }
 
@@ -1116,9 +1114,8 @@ dpctl_normalize_actions(int argc, char *argv[])
     for (i = 3; i < argc; i++) {
         char name[16];
         int number;
-        int n = -1;
 
-        if (sscanf(argv[i], "%15[^=]=%d%n", name, &number, &n) > 0 && n > 0) {
+        if (ovs_scan(argv[i], "%15[^=]=%d", name, &number)) {
             uintptr_t n = number;
             simap_put(&port_names, name, n);
         } else {