diff options
author | 2013-04-23 18:08:40 +0000 | |
---|---|---|
committer | 2013-04-23 18:08:40 +0000 | |
commit | 6be702bba05c1786667a15d945e6c24dd8cfa890 (patch) | |
tree | 63fda7e34d6351bf21311c82ce652f9fcbc9b847 /bin/ls/print.c | |
parent | use xasprintf instead of a series of strlcats and strdup. ok djm (diff) | |
download | wireguard-openbsd-6be702bba05c1786667a15d945e6c24dd8cfa890.tar.xz wireguard-openbsd-6be702bba05c1786667a15d945e6c24dd8cfa890.zip |
handle large ino_t; ok millert
Diffstat (limited to 'bin/ls/print.c')
-rw-r--r-- | bin/ls/print.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/bin/ls/print.c b/bin/ls/print.c index b87cbddbaf8..031ea80c60d 100644 --- a/bin/ls/print.c +++ b/bin/ls/print.c @@ -1,4 +1,4 @@ -/* $OpenBSD: print.c,v 1.28 2012/07/12 09:41:09 guenther Exp $ */ +/* $OpenBSD: print.c,v 1.29 2013/04/23 18:08:40 deraadt Exp $ */ /* $NetBSD: print.c,v 1.15 1996/12/11 03:25:39 thorpej Exp $ */ /* @@ -90,7 +90,8 @@ printlong(DISPLAY *dp) continue; sp = p->fts_statp; if (f_inode) - (void)printf("%*u ", dp->s_inode, sp->st_ino); + (void)printf("%*llu ", dp->s_inode, + (unsigned long long)sp->st_ino); if (f_size) (void)printf("%*qd ", dp->s_block, howmany(sp->st_blocks, blocksize)); @@ -220,7 +221,8 @@ printaname(FTSENT *p, u_long inodefield, u_long sizefield) sp = p->fts_statp; chcnt = 0; if (f_inode) - chcnt += printf("%*u ", (int)inodefield, sp->st_ino); + chcnt += printf("%*llu ", (int)inodefield, + (unsigned long long)sp->st_ino); if (f_size) chcnt += printf("%*qd ", (int)sizefield, howmany(sp->st_blocks, blocksize)); |