diff options
author | Karel Zak | 2006-12-07 00:25:46 +0100 |
---|---|---|
committer | Karel Zak | 2006-12-07 00:25:46 +0100 |
commit | c07ebfa1e02d208ab12430e6791ea147bcfaf9c0 (patch) | |
tree | d44a755098286f5d553c7aea1a73d98c2995d6ec /hwclock/cmos.c | |
parent | Imported from util-linux-2.10s tarball. (diff) | |
download | kernel-qcow2-util-linux-c07ebfa1e02d208ab12430e6791ea147bcfaf9c0.tar.gz kernel-qcow2-util-linux-c07ebfa1e02d208ab12430e6791ea147bcfaf9c0.tar.xz kernel-qcow2-util-linux-c07ebfa1e02d208ab12430e6791ea147bcfaf9c0.zip |
Imported from util-linux-2.11b tarball.
Diffstat (limited to 'hwclock/cmos.c')
-rw-r--r-- | hwclock/cmos.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/hwclock/cmos.c b/hwclock/cmos.c index 4fc82d798..94153dea0 100644 --- a/hwclock/cmos.c +++ b/hwclock/cmos.c @@ -61,10 +61,17 @@ int inb(int c){ return 0; } #define BCD_TO_BIN(val) ((val)=((val)&15) + ((val)>>4)*10) #define BIN_TO_BCD(val) ((val)=(((val)/10)<<4) + (val)%10) +/* The epoch. + Unix uses 1900 as epoch for a struct tm, and 1970 for a time_t. + But what was written to CMOS? + Digital DECstations use 1928 - this is on a mips + Digital Unix uses 1952. + Windows NT uses 1980. + The ARC console expects to boot Windows NT and uses 1980. + (But a Ruffian uses 1900, just like SRM.) + It is reported that ALPHA_PRE_V1_2_SRM_CONSOLE uses 1958. */ #define TM_EPOCH 1900 -int cmos_epoch = 1900; /* 1980 for an alpha in ARC console time */ - /* One also sees 1952 (Digital Unix) - and 1958 (ALPHA_PRE_V1_2_SRM_CONSOLE) */ +int cmos_epoch = 1900; /* Martin Ostermann writes: The problem with the Jensen is twofold: First, it has the clock at a @@ -576,7 +583,7 @@ get_permissions_cmos(void) { } else { rc = i386_iopl(3); if (rc == -2) { - fprintf(stderr, _("I failed to get permission because I didnt try.\n")); + fprintf(stderr, _("I failed to get permission because I didn't try.\n")); } else if (rc != 0) { rc = errno; fprintf(stderr, _("%s is unable to get I/O port access: " |