提交 c2735790 编写于 作者: B bellard

avoid exiting directly if file not found


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@567 c046a42c-6fe2-441c-8c8c-71466251a162
上级 985a19d6
......@@ -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 {
if (retval < 0)
return retval;
bprm.fd = retval;
}
bprm.filename = (char *)filename;
bprm.sh_bang = 0;
bprm.loader = 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册