Deleted Added
full compact
sysctl.c (61514) sysctl.c (62622)
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 "$FreeBSD: head/sbin/sysctl/sysctl.c 61514 2000-06-10 19:55:39Z phk $";
45 "$FreeBSD: head/sbin/sysctl/sysctl.c 62622 2000-07-05 07:46:41Z jhb $";
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>

--- 339 unchanged lines hidden (view full) ---

393 if (!nflag)
394 printf("%s: ", name);
395 printf("%s", p);
396 return (0);
397
398 case 'I':
399 if (!nflag)
400 printf("%s: ", name);
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>

--- 339 unchanged lines hidden (view full) ---

393 if (!nflag)
394 printf("%s: ", name);
395 printf("%s", p);
396 return (0);
397
398 case 'I':
399 if (!nflag)
400 printf("%s: ", name);
401 fmt++;
401 val = "";
402 while (len >= sizeof(int)) {
402 val = "";
403 while (len >= sizeof(int)) {
403 printf("%s%d", val, *(int *)p);
404 if(*fmt == 'U')
405 printf("%s%u", val, *(unsigned int *)p);
406 else
407 printf("%s%d", val, *(int *)p);
404 val = " ";
405 len -= sizeof (int);
406 p += sizeof (int);
407 }
408 return (0);
409
410 case 'L':
411 if (!nflag)
412 printf("%s: ", name);
408 val = " ";
409 len -= sizeof (int);
410 p += sizeof (int);
411 }
412 return (0);
413
414 case 'L':
415 if (!nflag)
416 printf("%s: ", name);
413 printf("%ld", *(long *)p);
417 fmt++;
418 if(*fmt == 'U')
419 printf("%lu", *(unsigned long *)p);
420 else
421 printf("%ld", *(long *)p);
414 return (0);
415
416 case 'P':
417 if (!nflag)
418 printf("%s: ", name);
419 printf("%p", *(void **)p);
420 return (0);
421

--- 75 unchanged lines hidden ---
422 return (0);
423
424 case 'P':
425 if (!nflag)
426 printf("%s: ", name);
427 printf("%p", *(void **)p);
428 return (0);
429

--- 75 unchanged lines hidden ---