sysctl.c (31214) | sysctl.c (37266) |
---|---|
1/* 2 * Copyright (c) 1993 3 * The Regents of the University of California. 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 --- 28 unchanged lines hidden (view full) --- 37 The Regents of the University of California. All rights reserved.\n"; 38#endif /* not lint */ 39 40#ifndef lint 41#if 0 42static char sccsid[] = "@(#)from: sysctl.c 8.1 (Berkeley) 6/6/93"; 43#endif 44static const char rcsid[] = | 1/* 2 * Copyright (c) 1993 3 * The Regents of the University of California. 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 --- 28 unchanged lines hidden (view full) --- 37 The Regents of the University of California. All rights reserved.\n"; 38#endif /* not lint */ 39 40#ifndef lint 41#if 0 42static char sccsid[] = "@(#)from: sysctl.c 8.1 (Berkeley) 6/6/93"; 43#endif 44static const char rcsid[] = |
45 "$Id: sysctl.c,v 1.15 1997/10/20 12:53:54 charnier Exp $"; | 45 "$Id: sysctl.c,v 1.16 1997/11/18 03:37:45 jdp Exp $"; |
46#endif /* not lint */ 47 48#include <sys/types.h> 49#include <sys/stat.h> 50#include <sys/sysctl.h> 51#include <sys/resource.h> 52 53#include <ctype.h> --- 186 unchanged lines hidden (view full) --- 240 (double)tv->ldavg[2]/(double)tv->fscale); 241 return (0); 242} 243 244static int 245S_timeval(int l2, void *p) 246{ 247 struct timeval *tv = (struct timeval*)p; | 46#endif /* not lint */ 47 48#include <sys/types.h> 49#include <sys/stat.h> 50#include <sys/sysctl.h> 51#include <sys/resource.h> 52 53#include <ctype.h> --- 186 unchanged lines hidden (view full) --- 240 (double)tv->ldavg[2]/(double)tv->fscale); 241 return (0); 242} 243 244static int 245S_timeval(int l2, void *p) 246{ 247 struct timeval *tv = (struct timeval*)p; |
248 time_t tv_sec; |
|
248 char *p1, *p2; 249 250 if (l2 != sizeof *tv) 251 err(1, "S_timeval %d != %d", l2, sizeof *tv); 252 printf("{ sec = %ld, usec = %ld } ", 253 tv->tv_sec, tv->tv_usec); | 249 char *p1, *p2; 250 251 if (l2 != sizeof *tv) 252 err(1, "S_timeval %d != %d", l2, sizeof *tv); 253 printf("{ sec = %ld, usec = %ld } ", 254 tv->tv_sec, tv->tv_usec); |
254 p1 = strdup(ctime(&tv->tv_sec)); | 255 tv_sec = tv->tv_sec; 256 p1 = strdup(ctime(&tv_sec)); |
255 for (p2=p1; *p2 ; p2++) 256 if (*p2 == '\n') 257 *p2 = '\0'; 258 fputs(p1, stdout); 259 return (0); 260} 261 262static int --- 200 unchanged lines hidden --- | 257 for (p2=p1; *p2 ; p2++) 258 if (*p2 == '\n') 259 *p2 = '\0'; 260 fputs(p1, stdout); 261 return (0); 262} 263 264static int --- 200 unchanged lines hidden --- |