View | Details | Raw Unified | Return to bug 12614
Collapse All | Expand All

(-)/usr/src/usr.sbin/apm/apm.c (+7 lines)
Lines 18-23 Link Here
18
	"$Id: apm.c,v 1.14 1998/09/04 16:08:54 imp Exp $";
18
	"$Id: apm.c,v 1.14 1998/09/04 16:08:54 imp Exp $";
19
#endif /* not lint */
19
#endif /* not lint */
20
20
21
#include <sys/types.h>
22
#include <sys/sysctl.h>
21
#include <err.h>
23
#include <err.h>
22
#include <stdio.h>
24
#include <stdio.h>
23
#include <stdlib.h>
25
#include <stdlib.h>
Lines 288-294 Link Here
288
	int     display = 0, batt_life = 0, ac_status = 0, standby = 0;
290
	int     display = 0, batt_life = 0, ac_status = 0, standby = 0;
289
	int	batt_time = 0, delta = 0;
291
	int	batt_time = 0, delta = 0;
290
	char	*cmdname;
292
	char	*cmdname;
293
	size_t	cmos_wall_len;
291
294
295
	cmos_wall_len = sizeof cmos_wall;
296
	if (sysctlbyname("machdep.wall_cmos_clock", &cmos_wall, &cmos_wall_len,
297
		NULL, 0) == -1)
298
	    err(1, "sysctlbyname machdep.wall_cmos_clock");
292
299
293
	if ((cmdname = strrchr(argv[0], '/')) != NULL)
300
	if ((cmdname = strrchr(argv[0], '/')) != NULL)
294
		cmdname++;
301
		cmdname++;

Return to bug 12614