Message ID | 535042d75e56fdf972a34bd74ece4e588568ba32.1264017981.git.quintela@redhat.com |
---|---|
State | New |
Headers | show |
diff --git a/net/slirp.c b/net/slirp.c index 3f91c4b..b75ad16 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'; } }