1/* 2 * Copyright (C) 1993-1998 by Andrey A. Chernov, Moscow, Russia. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 18 unchanged lines hidden (view full) --- 27#ifndef lint 28static const char copyright[] = 29"@(#)Copyright (C) 1993-1996 by Andrey A. Chernov, Moscow, Russia.\n\ 30 All rights reserved.\n"; 31#endif /* not lint */ 32 33#ifndef lint 34static const char rcsid[] = |
35 "$FreeBSD: head/sbin/adjkerntz/adjkerntz.c 92536 2002-03-18 04:55:09Z imp $"; |
36#endif /* not lint */ 37 38/* 39 * Andrey A. Chernov <ache@astral.msk.su> Dec 20 1993 40 * 41 * Fix kernel time value if machine run wall CMOS clock 42 * (and /etc/wall_cmos_clock file present) 43 * using zoneinfo rules or direct TZ environment variable set. --- 16 unchanged lines hidden (view full) --- 60/*#define DEBUG*/ 61 62#define True (1) 63#define False (0) 64#define Unknown (-1) 65 66#define REPORT_PERIOD (30*60) 67 |
68static void fake(int); 69static void usage(void); |
70 71static void |
72fake(int unused __unused) |
73{ 74 75 /* Do nothing. */ 76} 77 |
78int 79main(int argc, char *argv[]) |
80{ 81 struct tm local; 82 struct timeval tv, *stv; 83 struct timezone tz, *stz; 84 int kern_offset, wall_clock, disrtcset; 85 size_t len; 86 int mib[2]; 87 /* Avoid time_t here, can be unsigned long or worse */ --- 281 unchanged lines hidden (view full) --- 369 (void) sigsuspend(&emask); 370 goto again; 371 } 372 373 return 0; 374} 375 376static void |
377usage(void) |
378{ 379 fprintf(stderr, "%s\n%s\n%s\n%s\n", 380 "usage: adjkerntz -i", 381 "\t\t(initial call from /etc/rc)", 382 " adjkerntz -a [-s]", 383 "\t\t(adjustment call, -s for sleep/retry mode)"); 384 exit(2); 385} |