diff options
author | Eric Jackson <ericj@cvs.openbsd.org> | 2000-09-07 17:52:25 +0000 |
---|---|---|
committer | Eric Jackson <ericj@cvs.openbsd.org> | 2000-09-07 17:52:25 +0000 |
commit | 5514f7f20355848f9c876f7197bfba9e4b88c76e (patch) | |
tree | 6bf13c6ca958971efa5f1d14480c2712140a607e /sys/compat/ibcs2/ibcs2_stat.c | |
parent | 4f5c276138747ef97183ba337c8f6655dae25e8b (diff) |
common/compat_util.c
Diffstat (limited to 'sys/compat/ibcs2/ibcs2_stat.c')
-rw-r--r-- | sys/compat/ibcs2/ibcs2_stat.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/compat/ibcs2/ibcs2_stat.c b/sys/compat/ibcs2/ibcs2_stat.c index 4614b6a1f44..9a076503551 100644 --- a/sys/compat/ibcs2/ibcs2_stat.c +++ b/sys/compat/ibcs2/ibcs2_stat.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ibcs2_stat.c,v 1.4 1997/01/23 16:12:19 niklas Exp $ */ +/* $OpenBSD: ibcs2_stat.c,v 1.5 2000/09/07 17:52:23 ericj Exp $ */ /* $NetBSD: ibcs2_stat.c,v 1.5 1996/05/03 17:05:32 christos Exp $ */ /* @@ -171,9 +171,10 @@ ibcs2_sys_stat(p, v, retval) int error; caddr_t sg = stackgap_init(p->p_emul); + SCARG(&cup, ub) = stackgap_alloc(&sg, sizeof(st)); IBCS2_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path)); SCARG(&cup, path) = SCARG(uap, path); - SCARG(&cup, ub) = stackgap_alloc(&sg, sizeof(st)); + if ((error = compat_43_sys_stat(p, &cup, retval)) != 0) return error; if ((error = copyin(SCARG(&cup, ub), &st, sizeof(st))) != 0) @@ -199,9 +200,10 @@ ibcs2_sys_lstat(p, v, retval) int error; caddr_t sg = stackgap_init(p->p_emul); + SCARG(&cup, ub) = stackgap_alloc(&sg, sizeof(st)); IBCS2_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path)); SCARG(&cup, path) = SCARG(uap, path); - SCARG(&cup, ub) = stackgap_alloc(&sg, sizeof(st)); + if ((error = compat_43_sys_lstat(p, &cup, retval)) != 0) return error; if ((error = copyin(SCARG(&cup, ub), &st, sizeof(st))) != 0) |