%hu/%hd for uint16_t, %u/%d/%x for uint32_t

despite the name, ntohl returns uint32_t
also fix some %d into %u
---
 sys/arch/i386/i386/bios.c    |    4 ++--
 sys/arch/i386/i386/ioapic.c  |    2 +-
 sys/arch/i386/pci/pcibios.c  |    4 ++--
 sys/kern/vfs_cluster.c       |    2 +-
 sys/msdosfs/msdosfs_conv.c   |    2 +-
 sys/msdosfs/msdosfs_denode.c |    2 +-
 sys/msdosfs/msdosfs_vnops.c  |    2 +-
 sys/net/if_spppsubr.c        |    2 +-
 8 files changed, 10 insertions(+), 10 deletions(-)

diff --git sys/arch/i386/i386/bios.c sys/arch/i386/i386/bios.c
index 6e46e6a..75dab38 100644
--- sys/arch/i386/i386/bios.c
+++ sys/arch/i386/i386/bios.c
@@ -238,7 +238,7 @@ biosattach(struct device *parent, struct device *self, void 
*aux)
 
                        bios32_entry.segment = GSEL(GCODE_SEL, SEL_KPL);
                        bios32_entry.offset = 
(u_int32_t)ISA_HOLE_VADDR(h->entry);
-                       printf(", BIOS32 rev. %d @ 0x%lx", h->rev, h->entry);
+                       printf(", BIOS32 rev. %d @ 0x%x", h->rev, h->entry);
                        break;
                }
        }
@@ -285,7 +285,7 @@ biosattach(struct device *parent, struct device *self, void 
*aux)
                        for (; pa < end; pa+= NBPG, eva+= NBPG)
                                pmap_kenter_pa(eva, pa, VM_PROT_READ);
 
-                       printf(", SMBIOS rev. %d.%d @ 0x%lx (%d entries)",
+                       printf(", SMBIOS rev. %d.%d @ 0x%x (%hd entries)",
                            sh->majrev, sh->minrev, sh->addr, sh->count);
                        /*
                         * Unbelievably the SMBIOS version number
diff --git sys/arch/i386/i386/ioapic.c sys/arch/i386/i386/ioapic.c
index 0b0c6b8..4197553 100644
--- sys/arch/i386/i386/ioapic.c
+++ sys/arch/i386/i386/ioapic.c
@@ -300,7 +300,7 @@ ioapic_attach(struct device *parent, struct device *self, 
void *aux)
 
        ioapic_add(sc);
 
-       printf(" pa 0x%lx", aaa->apic_address);
+       printf(" pa 0x%x", aaa->apic_address);
 
        if (bus_mem_add_mapping(aaa->apic_address, PAGE_SIZE, 0, &bh) != 0) {
                printf(", map failed\n");
diff --git sys/arch/i386/pci/pcibios.c sys/arch/i386/pci/pcibios.c
index 372ac51..bc8a848 100644
--- sys/arch/i386/pci/pcibios.c
+++ sys/arch/i386/pci/pcibios.c
@@ -151,7 +151,7 @@ pcibiosprobe(struct device *parent, void *match, void *aux)
        rv = bios32_service(PCIBIOS_SIGNATURE, &pcibios_entry,
                &pcibios_entry_info);
 
-       PCIBIOS_PRINTV(("pcibiosprobe: 0x%lx:0x%lx at 0x%lx[0x%lx]\n",
+       PCIBIOS_PRINTV(("pcibiosprobe: 0x%hx:0x%x at 0x%x[0x%x]\n",
            pcibios_entry.segment, pcibios_entry.offset,
            pcibios_entry_info.bei_base, pcibios_entry_info.bei_size));
 
@@ -172,7 +172,7 @@ pcibiosattach(struct device *parent, struct device *self, 
void *aux)
            &rev_min, &mech1, &mech2,
            &scmech1, &scmech2, &sc->max_bus);
 
-       printf(": rev %d.%d @ 0x%lx/0x%lx\n",
+       printf(": rev %d.%d @ 0x%x/0x%x\n",
            rev_maj, rev_min >> 4, pcibios_entry_info.bei_base,
            pcibios_entry_info.bei_size);
 
diff --git sys/kern/vfs_cluster.c sys/kern/vfs_cluster.c
index f9df40e..118a411 100644
--- sys/kern/vfs_cluster.c
+++ sys/kern/vfs_cluster.c
@@ -175,7 +175,7 @@ cluster_wbuild(struct vnode *vp, struct buf *last_bp, long 
size,
 
 #ifdef DIAGNOSTIC
        if (size != vp->v_mount->mnt_stat.f_iosize)
-               panic("cluster_wbuild: size %ld != filesize %ld",
+               panic("cluster_wbuild: size %ld != filesize %u",
                        size, vp->v_mount->mnt_stat.f_iosize);
 #endif
 redo:
diff --git sys/msdosfs/msdosfs_conv.c sys/msdosfs/msdosfs_conv.c
index 727acd2..538aa1c 100644
--- sys/msdosfs/msdosfs_conv.c
+++ sys/msdosfs/msdosfs_conv.c
@@ -209,7 +209,7 @@ dos2unixtime(u_int dd, u_int dt, u_int dh, struct timespec 
*tsp)
                 */
                month = (dd & DD_MONTH_MASK) >> DD_MONTH_SHIFT;
                if (month == 0) {
-                       printf("dos2unixtime(): month value out of range 
(%ld)\n",
+                       printf("dos2unixtime(): month value out of range 
(%u)\n",
                            month);
                        month = 1;
                }
diff --git sys/msdosfs/msdosfs_denode.c sys/msdosfs/msdosfs_denode.c
index d384a8b..29f2e57 100644
--- sys/msdosfs/msdosfs_denode.c
+++ sys/msdosfs/msdosfs_denode.c
@@ -387,7 +387,7 @@ detrunc(struct denode *dep, uint32_t length, int flags, 
struct ucred *cred,
         * directory's life.
         */
        if ((DETOV(dep)->v_flag & VROOT) && !FAT32(pmp)) {
-               printf("detrunc(): can't truncate root directory, clust %ld, 
offset %ld\n",
+               printf("detrunc(): can't truncate root directory, clust %u, 
offset %u\n",
                    dep->de_dirclust, dep->de_diroffset);
                return (EINVAL);
        }
diff --git sys/msdosfs/msdosfs_vnops.c sys/msdosfs/msdosfs_vnops.c
index 79f611c..25d7030 100644
--- sys/msdosfs/msdosfs_vnops.c
+++ sys/msdosfs/msdosfs_vnops.c
@@ -1845,7 +1845,7 @@ msdosfs_print(void *v)
        struct denode *dep = VTODE(ap->a_vp);
 
        printf(
-           "tag VT_MSDOSFS, startcluster %ld, dircluster %ld, diroffset %ld ",
+           "tag VT_MSDOSFS, startcluster %u, dircluster %u, diroffset %u ",
            dep->de_StartCluster, dep->de_dirclust, dep->de_diroffset);
        printf(" dev %d, %d, %s\n",
            major(dep->de_dev), minor(dep->de_dev),
diff --git sys/net/if_spppsubr.c sys/net/if_spppsubr.c
index 6998a6c..0a467b1 100644
--- sys/net/if_spppsubr.c
+++ sys/net/if_spppsubr.c
@@ -1260,7 +1260,7 @@ sppp_cisco_send(struct sppp *sp, u_int32_t type, 
u_int32_t par1, u_int32_t par2)
 
        if (debug)
                log(LOG_DEBUG, SPP_FMT
-                   "cisco output: <0x%lx 0x%lx 0x%lx 0x%x 0x%x-0x%x>\n",
+                   "cisco output: <0x%x 0x%x 0x%x 0x%x 0x%x-0x%x>\n",
                        SPP_ARGS(ifp), ntohl(ch->type), ch->par1, ch->par2,
                        (u_int)ch->rel, (u_int)ch->time0, (u_int)ch->time1);
 
-- 
1.7.6

Reply via email to