diff options
| author | Poul-Henning Kamp <phk@FreeBSD.org> | 1998-11-08 19:27:43 +0000 |
|---|---|---|
| committer | Poul-Henning Kamp <phk@FreeBSD.org> | 1998-11-08 19:27:43 +0000 |
| commit | 2b4c0a3bc67e50a5c11fe3ab06ffa64f7b69aec7 (patch) | |
| tree | 53b5f09229278756bdf047cccc8d2b580e7bec8c /sbin/sysctl/sysctl.c | |
| parent | 5adee71e55dadbd6642f2949d830736a6ba448e0 (diff) | |
Notes
Diffstat (limited to 'sbin/sysctl/sysctl.c')
| -rw-r--r-- | sbin/sysctl/sysctl.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sbin/sysctl/sysctl.c b/sbin/sysctl/sysctl.c index 14247a08c225..94e630ef47e8 100644 --- a/sbin/sysctl/sysctl.c +++ b/sbin/sysctl/sysctl.c @@ -42,7 +42,7 @@ static const char copyright[] = static char sccsid[] = "@(#)from: sysctl.c 8.1 (Berkeley) 6/6/93"; #endif static const char rcsid[] = - "$Id: sysctl.c,v 1.17 1998/06/29 17:54:29 bde Exp $"; + "$Id: sysctl.c,v 1.18 1998/08/25 07:38:19 dfr Exp $"; #endif /* not lint */ #include <sys/types.h> @@ -389,7 +389,13 @@ show_var(int *oid, int nlen) case 'I': if (!nflag) printf("%s: ", name); - printf("%d", *(int *)p); + val = ""; + while (len >= sizeof(int)) { + printf("%s%d", val, *(int *)p); + val = " "; + len -= sizeof (int); + p += sizeof (int); + } return (0); case 'L': |
