examples/vm_power: fix build
authorFerruh Yigit <ferruh.yigit@intel.com>
Mon, 14 Oct 2019 10:03:50 +0000 (11:03 +0100)
committerThomas Monjalon <thomas@monjalon.net>
Wed, 23 Oct 2019 14:41:04 +0000 (16:41 +0200)
Fixes: 70febdcfd60f ("examples: check status of getting MAC address")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Tested-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
examples/vm_power_manager/guest_cli/vm_power_cli_guest.c

index 77e5440..fe09b07 100644 (file)
@@ -55,10 +55,10 @@ set_policy_mac(int port, int idx)
 
        /* Use port MAC address as the vfid */
        ret = rte_eth_macaddr_get(port, &pfid.addr);
-       if (retval != 0) {
+       if (ret != 0) {
                printf("Failed to get device (port %u) MAC address: %s\n",
-                               port, rte_strerror(-retval));
-               return retval;
+                               port, rte_strerror(-ret));
+               return ret;
        }
 
        printf("Port %u MAC: %02" PRIx8 ":%02" PRIx8 ":%02" PRIx8 ":"
@@ -108,6 +108,8 @@ set_policy_defaults(struct channel_packet *pkt)
        pkt->policy_to_use = TIME;
        pkt->command = PKT_POLICY;
        strcpy(pkt->vm_name, "ubuntu2");
+
+       return 0;
 }
 
 static void cmd_quit_parsed(__attribute__((unused)) void *parsed_result,