aboutsummaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorKirill A. Shutemov <kirill@shutemov.name>2010-01-20 00:56:16 +0100
committerAnthony Liguori <aliguori@us.ibm.com>2010-01-26 14:59:20 -0600
commit5a01e99fab34b2ec70148b8b92614158cca30800 (patch)
tree616e5d3912efdbf2dd4927adcf2f5ed13578f13f /net
parentdb89119d40390b8db0ea65278a6020e9653651ff (diff)
net/slirp.c: fix warning with _FORTIFY_SOURCE
CC net/slirp.o cc1: warnings being treated as errors net/slirp.c: In function 'slirp_smb_cleanup': net/slirp.c:470: error: ignoring return value of 'system', declared with attribute warn_unused_result make: *** [net/slirp.o] Error 1 Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name> Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'net')
-rw-r--r--net/slirp.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/net/slirp.c b/net/slirp.c
index 3f91c4bb3c..b75ad16521 100644
--- a/net/slirp.c
+++ b/net/slirp.c
@@ -464,10 +464,17 @@ int net_slirp_redir(const char *redir_str)
static void slirp_smb_cleanup(SlirpState *s)
{
char cmd[128];
+ int ret;
if (s->smb_dir[0] != '\0') {
snprintf(cmd, sizeof(cmd), "rm -rf %s", s->smb_dir);
- system(cmd);
+ ret = system(cmd);
+ if (!WIFEXITED(ret)) {
+ qemu_error("'%s' failed.\n", cmd);
+ } else if (WEXITSTATUS(ret)) {
+ qemu_error("'%s' failed. Error code: %d\n",
+ cmd, WEXITSTATUS(ret));
+ }
s->smb_dir[0] = '\0';
}
}