mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-03 12:35:02 +00:00
Make wall_cmos do something.
PR: 12614
This commit is contained in:
parent
3bf7ef5dc7
commit
94c8c4fb16
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=48938
@ -15,18 +15,24 @@
|
||||
|
||||
#ifndef lint
|
||||
static const char rcsid[] =
|
||||
"$Id: apm.c,v 1.13 1998/02/20 07:17:46 hosokawa Exp $";
|
||||
"$Id: apm.c,v 1.14 1998/09/04 16:08:54 imp Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
#include <sys/file.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/sysctl.h>
|
||||
|
||||
#include <machine/apm_bios.h>
|
||||
|
||||
#include <err.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/file.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <unistd.h>
|
||||
#include <machine/apm_bios.h>
|
||||
#include <time.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#define APMDEV "/dev/apm"
|
||||
|
||||
@ -288,8 +294,11 @@ main(int argc, char *argv[])
|
||||
int display = 0, batt_life = 0, ac_status = 0, standby = 0;
|
||||
int batt_time = 0, delta = 0;
|
||||
char *cmdname;
|
||||
size_t cmos_wall_len = sizeof(cmos_wall);
|
||||
|
||||
|
||||
if (sysctlbyname("machdep.wall_cmos_clock", &cmos_wall, &cmos_wall_len,
|
||||
NULL, 0) == -1)
|
||||
err(1, "sysctlbyname(machdep.wall_cmos_clock)");
|
||||
if ((cmdname = strrchr(argv[0], '/')) != NULL)
|
||||
cmdname++;
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user