Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 Feb 2017 06:32:39 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r313798 - head/bin/ls
Message-ID:  <201702160632.v1G6Wdnb066617@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kib
Date: Thu Feb 16 06:32:39 2017
New Revision: 313798
URL: https://svnweb.freebsd.org/changeset/base/313798

Log:
  Use uintmax_t to print st_nlink.
  
  Sponsored by:	The FreeBSD Foundation
  MFC after:	1 week

Modified:
  head/bin/ls/print.c

Modified: head/bin/ls/print.c
==============================================================================
--- head/bin/ls/print.c	Thu Feb 16 06:31:36 2017	(r313797)
+++ head/bin/ls/print.c	Thu Feb 16 06:32:39 2017	(r313798)
@@ -259,12 +259,12 @@ printlong(const DISPLAY *dp)
 		np = p->fts_pointer;
 		xo_attr("value", "%03o", (int) sp->st_mode & ALLPERMS);
 		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}  ",
-				buf, (int) sp->st_mode & ALLPERMS, dp->s_nlink, sp->st_nlink,
+			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, (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);
 		} else {
-			xo_emit("{t:mode/%s}{e:mode_octal/%03o} {t:links/%*u} {t:user/%-*s}  {t:group/%-*s}  ",
-				buf, (int) sp->st_mode & ALLPERMS, dp->s_nlink, sp->st_nlink,
+			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, (uintmax_t)sp->st_nlink,
 				dp->s_user, np->user, dp->s_group, np->group);
 		}
 		if (S_ISBLK(sp->st_mode))



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201702160632.v1G6Wdnb066617>