diff options
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/file/file.c | 6 | ||||
-rw-r--r-- | usr.bin/find/ls.c | 4 | ||||
-rw-r--r-- | usr.bin/fstat/fstat.c | 6 |
3 files changed, 8 insertions, 8 deletions
diff --git a/usr.bin/file/file.c b/usr.bin/file/file.c index 904456443ff..a0eb5a267ba 100644 --- a/usr.bin/file/file.c +++ b/usr.bin/file/file.c @@ -1,4 +1,4 @@ -/* $OpenBSD: file.c,v 1.67 2019/01/06 18:35:19 tedu Exp $ */ +/* $OpenBSD: file.c,v 1.68 2019/02/05 02:17:32 deraadt Exp $ */ /* * Copyright (c) 2015 Nicholas Marriott <nicm@openbsd.org> @@ -539,12 +539,12 @@ try_stat(struct input_file *inf) xasprintf(&inf->result, "socket"); return (1); case S_IFBLK: - xasprintf(&inf->result, "block special (%ld/%ld)", + xasprintf(&inf->result, "block special (%lu/%lu)", (long)major(inf->msg->sb.st_rdev), (long)minor(inf->msg->sb.st_rdev)); return (1); case S_IFCHR: - xasprintf(&inf->result, "character special (%ld/%ld)", + xasprintf(&inf->result, "character special (%lu/%lu)", (long)major(inf->msg->sb.st_rdev), (long)minor(inf->msg->sb.st_rdev)); return (1); diff --git a/usr.bin/find/ls.c b/usr.bin/find/ls.c index 230c8ea93f4..9ddafe9ceab 100644 --- a/usr.bin/find/ls.c +++ b/usr.bin/find/ls.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ls.c,v 1.17 2015/03/15 00:41:28 millert Exp $ */ +/* $OpenBSD: ls.c,v 1.18 2019/02/05 02:17:32 deraadt Exp $ */ /* * Copyright (c) 1989, 1993 @@ -66,7 +66,7 @@ printlong(char *name, char *accpath, struct stat *sb) NAME_WIDTH, UT_NAMESIZE, group_from_gid(sb->st_gid, 0)); if (S_ISCHR(sb->st_mode) || S_ISBLK(sb->st_mode)) - (void)printf("%3d, %3d ", major(sb->st_rdev), + (void)printf("%3u, %3u ", major(sb->st_rdev), minor(sb->st_rdev)); else (void)printf("%8lld ", (long long)sb->st_size); diff --git a/usr.bin/fstat/fstat.c b/usr.bin/fstat/fstat.c index 075d396300c..fe89940aa48 100644 --- a/usr.bin/fstat/fstat.c +++ b/usr.bin/fstat/fstat.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fstat.c,v 1.98 2019/01/28 17:49:50 martijn Exp $ */ +/* $OpenBSD: fstat.c,v 1.99 2019/02/05 02:17:32 deraadt Exp $ */ /* * Copyright (c) 2009 Todd C. Miller <millert@openbsd.org> @@ -467,7 +467,7 @@ vtrans(struct kinfo_file *kf) } if (nflg) - (void)printf(" %2ld,%-2ld", (long)major(kf->va_fsid), + (void)printf(" %2lu,%-2lu", (long)major(kf->va_fsid), (long)minor(kf->va_fsid)); else if (!(kf->v_flag & VCLONE)) (void)printf(" %-8s", kf->f_mntonname); @@ -497,7 +497,7 @@ vtrans(struct kinfo_file *kf) if (nflg || ((name = devname(kf->va_rdev, kf->v_type == VCHR ? S_IFCHR : S_IFBLK)) == NULL)) - printf(" %2d,%-3d", major(kf->va_rdev), minor(kf->va_rdev)); + printf(" %2u,%-3u", major(kf->va_rdev), minor(kf->va_rdev)); else printf(" %7s", name); if (oflg) |