diff options
author | phk <phk@FreeBSD.org> | 2006-05-11 17:23:57 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2006-05-11 17:23:57 +0000 |
commit | 8777f94272f15ec04b33f002b60af8895ace75ae (patch) | |
tree | 326d0e7b049101a9ce63997ef4a732e693fa36dc /usr.sbin | |
parent | 1fe559753b36d9415940e95b6a8bd732c5d05e29 (diff) | |
download | FreeBSD-src-8777f94272f15ec04b33f002b60af8895ace75ae.zip FreeBSD-src-8777f94272f15ec04b33f002b60af8895ace75ae.tar.gz |
Use sysctlbyname() instead of sysctl
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/mount_nwfs/mount_nwfs.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/usr.sbin/mount_nwfs/mount_nwfs.c b/usr.sbin/mount_nwfs/mount_nwfs.c index c784a9a..98a5f8e 100644 --- a/usr.sbin/mount_nwfs/mount_nwfs.c +++ b/usr.sbin/mount_nwfs/mount_nwfs.c @@ -81,7 +81,6 @@ main(int argc, char *argv[]) { time_t ltime; int opt, error, mntflags, nlsopt, wall_clock; size_t len; - int mib[2]; char *p, *p1, tmp[1024]; u_char *pv; @@ -309,10 +308,8 @@ main(int argc, char *argv[]) { /* }*/ mdata.nls.opt = nlsopt; - mib[0] = CTL_MACHDEP; - mib[1] = CPU_WALLCLOCK; len = sizeof(wall_clock); - if (sysctl(mib, 2, &wall_clock, &len, NULL, 0) == -1) + if (sysctlbyname("machdep.wall_cmos_clock", &wall_clock, &len, NULL, 0) == -1) err(EX_OSERR, "get wall_clock"); if (wall_clock == 0) { time(<ime); |