diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2013-04-24 13:46:30 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2013-04-24 13:46:30 +0000 |
commit | b02186bd50b9c429241b632a68698d98cd4d2538 (patch) | |
tree | 8d8753142116b5b1438946d3d359ee17f28720c0 /sbin/fsdb/fsdb.c | |
parent | 7f8dcae154140403edd5e905d7b9e5e80aea6dca (diff) |
pretty print bigger off_t
ok tedu otto
Diffstat (limited to 'sbin/fsdb/fsdb.c')
-rw-r--r-- | sbin/fsdb/fsdb.c | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/sbin/fsdb/fsdb.c b/sbin/fsdb/fsdb.c index c50f9c3d12d..07d1b96edb7 100644 --- a/sbin/fsdb/fsdb.c +++ b/sbin/fsdb/fsdb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fsdb.c,v 1.25 2013/04/23 07:11:27 otto Exp $ */ +/* $OpenBSD: fsdb.c,v 1.26 2013/04/24 13:46:29 deraadt Exp $ */ /* $NetBSD: fsdb.c,v 1.7 1997/01/11 06:50:53 lukem Exp $ */ /*- @@ -202,7 +202,8 @@ prompt(EditLine *el) { static char pstring[64]; - snprintf(pstring, sizeof(pstring), "fsdb (inum: %d)> ", curinum); + snprintf(pstring, sizeof(pstring), "fsdb (inum: %llu)> ", + (unsigned long long)curinum); return pstring; } @@ -285,8 +286,8 @@ static ino_t ocurrent; #define GETINUM(ac,inum) inum = strtoul(argv[ac], &cp, 0); \ if (inum < ROOTINO || inum > maxino || cp == argv[ac] || *cp != '\0' ) { \ - printf("inode %d out of range; range is [%d,%d]\n", \ - inum, ROOTINO, maxino); \ + printf("inode %llu out of range; range is [%d,%d]\n", \ + (unsigned long long)inum, ROOTINO, maxino); \ return 1; \ } @@ -346,7 +347,8 @@ CMDFUNCSTART(uplink) if (!checkactive()) return 1; DIP_SET(curinode, di_nlink, DIP(curinode, di_nlink) + 1); - printf("inode %d link count now %d\n", curinum, DIP(curinode, di_nlink)); + printf("inode %llu link count now %d\n", + (unsigned long long)curinum, DIP(curinode, di_nlink)); inodirty(); return 0; } @@ -356,7 +358,8 @@ CMDFUNCSTART(downlink) if (!checkactive()) return 1; DIP_SET(curinode, di_nlink, DIP(curinode, di_nlink) - 1); - printf("inode %d link count now %d\n", curinum, DIP(curinode, di_nlink)); + printf("inode %llu link count now %d\n", + (unsigned long long)curinum, DIP(curinode, di_nlink)); inodirty(); return 0; } @@ -386,9 +389,9 @@ scannames(struct inodesc *idesc) { struct direct *dirp = idesc->id_dirp; - printf("slot %d ino %d reclen %d: %s, `%.*s'\n", - slot++, dirp->d_ino, dirp->d_reclen, typename[dirp->d_type], - dirp->d_namlen, dirp->d_name); + printf("slot %d ino %llu reclen %d: %s, `%.*s'\n", + slot++, (unsigned long long)dirp->d_ino, dirp->d_reclen, + typename[dirp->d_type], dirp->d_namlen, dirp->d_name); return (KEEPON); } @@ -474,7 +477,8 @@ CMDFUNCSTART(ln) return 1; rval = makeentry(curinum, inum, argv[2]); if (rval) - printf("Ino %d entered as `%s'\n", inum, argv[2]); + printf("Ino %llu entered as `%s'\n", + (unsigned long long)inum, argv[2]); else printf("could not enter name? weird.\n"); curinode = ginode(curinum); |