adjkerntz.c (79747) | adjkerntz.c (92536) |
---|---|
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[] = | 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 79747 2001-07-15 05:41:57Z dd $"; | 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 | 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 __P((int)); 69static void usage __P((void)); | 68static void fake(int); 69static void usage(void); |
70 71static void | 70 71static void |
72fake(unused) 73 int unused __unused; | 72fake(int unused __unused) |
74{ 75 76 /* Do nothing. */ 77} 78 | 73{ 74 75 /* Do nothing. */ 76} 77 |
79int main(argc, argv) 80 int argc; 81 char **argv; | 78int 79main(int argc, char *argv[]) |
82{ 83 struct tm local; 84 struct timeval tv, *stv; 85 struct timezone tz, *stz; 86 int kern_offset, wall_clock, disrtcset; 87 size_t len; 88 int mib[2]; 89 /* Avoid time_t here, can be unsigned long or worse */ --- 281 unchanged lines hidden (view full) --- 371 (void) sigsuspend(&emask); 372 goto again; 373 } 374 375 return 0; 376} 377 378static void | 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 |
379usage() | 377usage(void) |
380{ 381 fprintf(stderr, "%s\n%s\n%s\n%s\n", 382 "usage: adjkerntz -i", 383 "\t\t(initial call from /etc/rc)", 384 " adjkerntz -a [-s]", 385 "\t\t(adjustment call, -s for sleep/retry mode)"); 386 exit(2); 387} | 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} |