test/crypto: add capability check
[dpdk.git] / examples / vm_power_manager / guest_cli / main.c
index 2094145..f63b3c9 100644 (file)
@@ -55,7 +55,11 @@ parse_args(int argc, char **argv)
        int i, cnt, idx;
 
        policy = get_policy();
-       set_policy_defaults(policy);
+       ret = set_policy_defaults(policy);
+       if (ret != 0) {
+               printf("Failed to set policy defaults\n");
+               return -1;
+       }
 
        argvopt = argv;
 
@@ -120,7 +124,10 @@ parse_args(int argc, char **argv)
                        for (i = 0; i < MAX_VCPU_PER_VM; i++) {
                                if (ports[i]) {
                                        printf("***Using port %d\n", i);
-                                       set_policy_mac(i, idx++);
+                                       if (set_policy_mac(i, idx++) != 0) {
+                                               printf("Cannot set policy MAC");
+                                               return -1;
+                                       }
                                }
                        }
                        policy->nb_mac_to_monitor = idx;