Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys Fix printing formats.



details:   https://anonhg.NetBSD.org/src/rev/dba996b506d0
branches:  trunk
changeset: 583580:dba996b506d0
user:      elad <elad%NetBSD.org@localhost>
date:      Sat Aug 13 12:08:34 2005 +0000

description:
Fix printing formats.
  - size_t is %zu
  - dev_t is uint32_t is %u
  - long is %ld

diffstat:

 sys/dev/verified_exec.c      |  18 +++++++++---------
 sys/kern/kern_verifiedexec.c |   8 ++++----
 2 files changed, 13 insertions(+), 13 deletions(-)

diffs (94 lines):

diff -r 38e41ecc8ed6 -r dba996b506d0 sys/dev/verified_exec.c
--- a/sys/dev/verified_exec.c   Sat Aug 13 10:50:50 2005 +0000
+++ b/sys/dev/verified_exec.c   Sat Aug 13 12:08:34 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: verified_exec.c,v 1.19 2005/08/03 18:05:16 elad Exp $  */
+/*     $NetBSD: verified_exec.c,v 1.20 2005/08/13 12:08:34 elad Exp $  */
 
 /*-
  * Copyright 2005 Elad Efrat <elad%bsd.org.il@localhost>
@@ -31,9 +31,9 @@
 
 #include <sys/cdefs.h>
 #if defined(__NetBSD__)
-__KERNEL_RCSID(0, "$NetBSD: verified_exec.c,v 1.19 2005/08/03 18:05:16 elad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: verified_exec.c,v 1.20 2005/08/13 12:08:34 elad Exp $");
 #else
-__RCSID("$Id: verified_exec.c,v 1.19 2005/08/03 18:05:16 elad Exp $\n$NetBSD: verified_exec.c,v 1.19 2005/08/03 18:05:16 elad Exp $");
+__RCSID("$Id: verified_exec.c,v 1.20 2005/08/13 12:08:34 elad Exp $\n$NetBSD: verified_exec.c,v 1.20 2005/08/13 12:08:34 elad Exp $");
 #endif
 
 #include <sys/param.h>
@@ -125,7 +125,7 @@
 {
        if (veriexec_verbose >= 2) {
                printf("Veriexec: veriexecopen: Veriexec load device "
-                      "open attempt by uid=%u, pid=%u. (dev=%d)\n",
+                      "open attempt by uid=%u, pid=%u. (dev=%u)\n",
                       p->p_ucred->cr_uid, p->p_pid, dev);
        }
 
@@ -241,7 +241,7 @@
                         * the signature file. Just give collision info
                         * and return.
                         */
-                       printf("veriexec: Duplicate entry. [%s, %ld:%lu] "
+                       printf("veriexec: Duplicate entry. [%s, %ld:%ld] "
                               "old[type=0x%02x, algorithm=%s], "
                               "new[type=0x%02x, algorithm=%s] "
                               "(%s fingerprint)\n",
@@ -264,7 +264,7 @@
                        free(e, M_TEMP);
                        printf("Veriexec: veriexecioctl: Invalid or unknown "
                               "fingerprint type \"%s\" for file \"%s\" "
-                              "(dev=%lu, inode=%lu)\n", params->fp_type,
+                              "(dev=%ld, inode=%ld)\n", params->fp_type,
                               params->file, va.va_fsid, va.va_fileid);
                        return(EINVAL);
                }
@@ -280,10 +280,10 @@
                if (e->ops->hash_len != params->size) {
                        printf("Veriexec: veriexecioctl: Inconsistent "
                               "fingerprint size for type \"%s\" for file "
-                              "\"%s\" (dev=%lu, inode=%lu), size was %u "
-                              "was expecting %lu\n", params->fp_type,
+                              "\"%s\" dev=%ld, inode=%ld), size was %u "
+                              "was expecting %zu\n", params->fp_type,
                               params->file, va.va_fsid, va.va_fileid,
-                              params->size, (unsigned long)e->ops->hash_len);
+                              params->size, e->ops->hash_len);
                        free(e, M_TEMP);
                        return(EINVAL);
                }
diff -r 38e41ecc8ed6 -r dba996b506d0 sys/kern/kern_verifiedexec.c
--- a/sys/kern/kern_verifiedexec.c      Sat Aug 13 10:50:50 2005 +0000
+++ b/sys/kern/kern_verifiedexec.c      Sat Aug 13 12:08:34 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_verifiedexec.c,v 1.33 2005/08/02 16:14:10 elad Exp $      */
+/*     $NetBSD: kern_verifiedexec.c,v 1.34 2005/08/13 12:08:34 elad Exp $      */
 
 /*-
  * Copyright 2005 Elad Efrat <elad%bsd.org.il@localhost>
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_verifiedexec.c,v 1.33 2005/08/02 16:14:10 elad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_verifiedexec.c,v 1.34 2005/08/13 12:08:34 elad Exp $");
 
 #include "opt_verified_exec.h"
 
@@ -526,11 +526,11 @@
 
        if (!verbose || (verbose <= veriexec_verbose)) {
                if (!alarm || p == NULL)
-                       f("veriexec: %s [%s, %d:%u%s", msg, filename,
+                       f("veriexec: %s [%s, %ld:%ld%s", msg, filename,
                            va->va_fsid, va->va_fileid,
                            die ? "]" : "]\n");
                else
-                       f("veriexec: %s [%s, %d:%u, pid=%u, uid=%u, "
+                       f("veriexec: %s [%s, %ld:%ld, pid=%u, uid=%u, "
                            "gid=%u%s", msg, filename, va->va_fsid,
                            va->va_fileid, p->p_pid, p->p_cred->p_ruid,
                            p->p_cred->p_rgid, die ? "]" : "]\n");



Home | Main Index | Thread Index | Old Index