* @(#)sun_misc.c 8.1 (Berkeley) 6/18/93
*
* $FreeBSD: src/sys/i386/ibcs2/ibcs2_misc.c,v 1.34 1999/09/29 15:12:09 marcel Exp $
- * $DragonFly: src/sys/emulation/ibcs2/i386/Attic/ibcs2_misc.c,v 1.7 2003/08/07 21:17:17 dillon Exp $
+ * $DragonFly: src/sys/emulation/ibcs2/i386/Attic/ibcs2_misc.c,v 1.8 2003/08/20 07:13:25 dillon Exp $
*/
/*
caddr_t sg = stackgap_init();
int error;
- CHECKALTEXIST(&sg, SCARG(uap, path));
- SCARG(&ea, fname) = SCARG(uap, path);
- SCARG(&ea, argv) = SCARG(uap, argp);
- SCARG(&ea, envv) = NULL;
+ CHECKALTEXIST(&sg, uap->path);
+
+ /* note: parts of result64 may be maintained or cleared by execve */
+ ea.sysmsg_result64 = uap->sysmsg_result64;
+ ea.fname = uap->path;
+ ea.argv = uap->argp;
+ ea.envv = NULL;
error = execve(&ea);
- uap->sysmsg_result = ea.sysmsg_result;
+ uap->sysmsg_result64 = ea.sysmsg_result64;
return(error);
}
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $FreeBSD: src/sys/i386/linux/linux_machdep.c,v 1.6.2.4 2001/11/05 19:08:23 marcel Exp $
- * $DragonFly: src/sys/emulation/linux/i386/linux_machdep.c,v 1.8 2003/08/07 21:17:18 dillon Exp $
+ * $DragonFly: src/sys/emulation/linux/i386/linux_machdep.c,v 1.9 2003/08/20 07:13:27 dillon Exp $
*/
#include <sys/param.h>
printf(ARGS(execve, "%s"), args->path);
#endif
- bsd.sysmsg_result = 0;
+ /*
+ * Note: inherit and set the full 64 bit syscall return
+ * value so a successful execve() sets %edx to 0.
+ */
+ bsd.sysmsg_result64 = args->sysmsg_result64;
bsd.fname = args->path;
bsd.argv = args->argp;
bsd.envv = args->envp;
error = execve(&bsd);
- args->sysmsg_result = bsd.sysmsg_result;
+ args->sysmsg_result64 = bsd.sysmsg_result64;
return(error);
}
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $FreeBSD: src/sys/svr4/svr4_misc.c,v 1.13.2.7 2003/01/14 21:33:58 dillon Exp $
- * $DragonFly: src/sys/emulation/svr4/Attic/svr4_misc.c,v 1.11 2003/08/07 21:17:19 dillon Exp $
+ * $DragonFly: src/sys/emulation/svr4/Attic/svr4_misc.c,v 1.12 2003/08/20 07:13:30 dillon Exp $
*/
/*
int error;
sg = stackgap_init();
- CHECKALTEXIST(&sg, SCARG(uap, path));
+ CHECKALTEXIST(&sg, uap->path);
- SCARG(&ap, fname) = SCARG(uap, path);
- SCARG(&ap, argv) = SCARG(uap, argp);
- SCARG(&ap, envv) = NULL;
- ap.sysmsg_result = 0;
+ /* note: parts of result64 may be maintained or cleared by execve */
+ ap.sysmsg_result64 = uap->sysmsg_result64;
+ ap.fname = uap->path;
+ ap.argv = uap->argp;
+ ap.envv = NULL;
error = execve(&ap);
- uap->sysmsg_result = ap.sysmsg_result;
+ uap->sysmsg_result64 = ap.sysmsg_result64;
return(error);
}