mirror of
https://github.com/qemu/qemu.git
synced 2024-11-28 14:24:02 +08:00
avoid exiting directly if file not found
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@567 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
985a19d6d1
commit
c27357906a
@ -1284,14 +1284,9 @@ int elf_exec(const char * filename, char ** argv, char ** envp,
|
||||
for (i=0 ; i<MAX_ARG_PAGES ; i++) /* clear page-table */
|
||||
bprm.page[i] = 0;
|
||||
retval = open(filename, O_RDONLY);
|
||||
if (retval == -1) {
|
||||
perror(filename);
|
||||
exit(-1);
|
||||
/* return retval; */
|
||||
}
|
||||
else {
|
||||
bprm.fd = retval;
|
||||
}
|
||||
if (retval < 0)
|
||||
return retval;
|
||||
bprm.fd = retval;
|
||||
bprm.filename = (char *)filename;
|
||||
bprm.sh_bang = 0;
|
||||
bprm.loader = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user