]> git.saurik.com Git - apple/system_cmds.git/blobdiff - sysctl.tproj/sysctl.c
system_cmds-790.20.2.tar.gz
[apple/system_cmds.git] / sysctl.tproj / sysctl.c
index 7e6978786aeee354f67147bcb6914db6c357fcf6..606459a7d56787ec0b72d5d720e550862685bed6 100644 (file)
@@ -38,7 +38,7 @@ __unused static const char copyright[] =
 #if 0
 static char sccsid[] = "@(#)from: sysctl.c     8.1 (Berkeley) 6/6/93";
 #endif
-static const char rcsid[] =
+__unused static const char rcsid[] =
   "$FreeBSD$";
 #endif /* not lint */
 
@@ -513,7 +513,7 @@ static int
 S_xswusage(int l2, void *p)
 {
         struct xsw_usage *xsu = (struct xsw_usage *)p;
-  
+
        if (l2 != sizeof(*xsu)) {
                warnx("S_xswusage %d != %ld", l2, sizeof(*xsu));
                return (1);
@@ -680,6 +680,9 @@ oidfmt(int *oid, int len, char *fmt, u_int *kind)
                                        }
                                } else if (buf[sizeof(u_int)] == 'L') {
                                        *kind = (*kind & ~CTLTYPE) | CTLTYPE_LONG;
+                    if (buf[sizeof(u_int)+1] == 'U') {
+                        *kind = (*kind & ~CTLTYPE) | CTLTYPE_ULONG;
+                    }
                                }
                                break;
                        case CTLTYPE_QUAD:
@@ -693,7 +696,7 @@ oidfmt(int *oid, int len, char *fmt, u_int *kind)
                }
        }
 #endif
-       
+
        return (0);
 }
 
@@ -825,7 +828,7 @@ show_var(int *oid, int nlen)
                return (1);
        }
 #endif
-       
+
        switch (ctltype) {
        case CTLTYPE_STRING:
                if (!nflag)