1
0
mirror of https://github.com/openbsd/src.git synced 2025-01-04 23:35:36 -08:00

handle large ino_t; ok millert

This commit is contained in:
deraadt 2013-04-23 18:08:40 +00:00
parent 2de2283148
commit 6be702bba0
2 changed files with 8 additions and 5 deletions

View File

@ -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));

View File

@ -1,4 +1,4 @@
/* $OpenBSD: ls.c,v 1.13 2009/10/27 23:59:38 deraadt Exp $ */
/* $OpenBSD: ls.c,v 1.14 2013/04/23 18:08:40 deraadt Exp $ */
/*
* Copyright (c) 1989, 1993
@ -58,7 +58,8 @@ printlong(char *name, char *accpath, struct stat *sb)
{
char modep[15];
(void)printf("%6u %4lld ", sb->st_ino, (long long)sb->st_blocks);
(void)printf("%6llu %4lld ", (unsigned long long)sb->st_ino,
(long long)sb->st_blocks);
(void)strmode(sb->st_mode, modep);
(void)printf("%s %3u %-*.*s %-*.*s ", modep, sb->st_nlink,
NAME_WIDTH, UT_NAMESIZE, user_from_uid(sb->st_uid, 0),