Use uintmax_t to print st_nlink.

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
This commit is contained in:
Konstantin Belousov 2017-02-16 06:32:39 +00:00
parent cf53034fc7
commit cdf44896bb
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=313798

View File

@ -259,12 +259,12 @@ printlong(const DISPLAY *dp)
np = p->fts_pointer; np = p->fts_pointer;
xo_attr("value", "%03o", (int) sp->st_mode & ALLPERMS); xo_attr("value", "%03o", (int) sp->st_mode & ALLPERMS);
if (f_numericonly) { if (f_numericonly) {
xo_emit("{t:mode/%s}{e:mode_octal/%03o} {t:links/%*u} {td:user/%-*s}{e:user/%ju} {td:group/%-*s}{e:group/%ju} ", xo_emit("{t:mode/%s}{e:mode_octal/%03o} {t:links/%*ju} {td:user/%-*s}{e:user/%ju} {td:group/%-*s}{e:group/%ju} ",
buf, (int) sp->st_mode & ALLPERMS, dp->s_nlink, sp->st_nlink, buf, (int) sp->st_mode & ALLPERMS, dp->s_nlink, (uintmax_t)sp->st_nlink,
dp->s_user, np->user, (uintmax_t)sp->st_uid, dp->s_group, np->group, (uintmax_t)sp->st_gid); dp->s_user, np->user, (uintmax_t)sp->st_uid, dp->s_group, np->group, (uintmax_t)sp->st_gid);
} else { } else {
xo_emit("{t:mode/%s}{e:mode_octal/%03o} {t:links/%*u} {t:user/%-*s} {t:group/%-*s} ", xo_emit("{t:mode/%s}{e:mode_octal/%03o} {t:links/%*ju} {t:user/%-*s} {t:group/%-*s} ",
buf, (int) sp->st_mode & ALLPERMS, dp->s_nlink, sp->st_nlink, buf, (int) sp->st_mode & ALLPERMS, dp->s_nlink, (uintmax_t)sp->st_nlink,
dp->s_user, np->user, dp->s_group, np->group); dp->s_user, np->user, dp->s_group, np->group);
} }
if (S_ISBLK(sp->st_mode)) if (S_ISBLK(sp->st_mode))