Skip to content

Commit

Permalink
Tools: hv: check return value of system in hv_kvp_daemon
Browse files Browse the repository at this point in the history
hv_kvp_daemon.c: In function 'main':
hv_kvp_daemon.c:1441:8: warning: ignoring return value of 'daemon', declared with attribute warn_unused_result [-Wunused-result]

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
olafhering authored and gregkh committed Aug 5, 2013
1 parent 57969af commit d3b688c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tools/hv/hv_kvp_daemon.c
Original file line number Diff line number Diff line change
Expand Up @@ -1353,7 +1353,11 @@ static int kvp_set_ip_info(char *if_name, struct hv_kvp_ipaddr_value *new_val)
*/

snprintf(cmd, sizeof(cmd), "%s %s", "hv_set_ifconfig", if_file);
system(cmd);
if (system(cmd)) {
syslog(LOG_ERR, "Failed to execute cmd '%s'; error: %d %s",
cmd, errno, strerror(errno));
return HV_E_FAIL;
}
return 0;

setval_error:
Expand Down

0 comments on commit d3b688c

Please sign in to comment.