mirror of
https://git.FreeBSD.org/src.git
synced 2024-11-27 08:00:11 +00:00
compat_freebsd4: Fix handling of errors from subyte()
Upon failure, subyte() returns -1, not an errno value. MFC after: 1 week
This commit is contained in:
parent
74e713804f
commit
c38df501ce
@ -364,13 +364,11 @@ freebsd4_uname(struct thread *td, struct freebsd4_uname_args *uap)
|
||||
for(s = version; *s && *s != '#'; s++);
|
||||
|
||||
for(us = uap->name->version; *s && *s != ':'; s++) {
|
||||
error = subyte( us++, *s);
|
||||
if (error)
|
||||
return (error);
|
||||
if (subyte(us++, *s) != 0)
|
||||
return (EFAULT);
|
||||
}
|
||||
error = subyte( us++, 0);
|
||||
if (error)
|
||||
return (error);
|
||||
if (subyte(us++, 0) != 0)
|
||||
return (EFAULT);
|
||||
|
||||
name[0] = CTL_HW;
|
||||
name[1] = HW_MACHINE;
|
||||
|
Loading…
Reference in New Issue
Block a user