vm/file-editor: include exit code in error message
This commit is contained in:
parent
a7f34874ce
commit
d60198d551
@ -110,13 +110,16 @@ main()
|
|||||||
default:
|
default:
|
||||||
waitpid(child, &status, 0);
|
waitpid(child, &status, 0);
|
||||||
if (status != 0) {
|
if (status != 0) {
|
||||||
|
char cmd[512];
|
||||||
#ifdef USE_KDIALOG
|
#ifdef USE_KDIALOG
|
||||||
system
|
snprintf(cmd, sizeof(cmd),
|
||||||
("HOME=/home/user DISPLAY=:0 /usr/bin/kdialog --sorry 'Unable to handle mimetype of the requested file!' > /tmp/kdialog.log 2>&1 </dev/null");
|
"HOME=/home/user DISPLAY=:0 /usr/bin/kdialog --sorry 'Unable to handle mimetype of the requested file (exit status: %d)!' > /tmp/kdialog.log 2>&1 </dev/null", status);
|
||||||
|
("HOME=/home/user DISPLAY=:0 /usr/bin/kdialog --sorry 'Unable to handle mimetype of the requested file (exit status: %d)!' > /tmp/kdialog.log 2>&1 </dev/null", status);
|
||||||
#else
|
#else
|
||||||
system
|
snprintf(cmd, sizeof(cmd),
|
||||||
("HOME=/home/user DISPLAY=:0 /usr/bin/zenity --error --text 'Unable to handle mimetype of the requested file!' > /tmp/kdialog.log 2>&1 </dev/null");
|
"HOME=/home/user DISPLAY=:0 /usr/bin/zenity --error --text 'Unable to handle mimetype of the requested file (exit status: %d)!' > /tmp/kdialog.log 2>&1 </dev/null", status);
|
||||||
#endif
|
#endif
|
||||||
|
system(cmd);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user