Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 1 May 2017 10:12:59 +0000 (UTC)
From:      Peter Holm <pho@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-user@freebsd.org
Subject:   svn commit: r317644 - user/pho/stress2/misc
Message-ID:  <201705011012.v41ACxEs090934@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pho
Date: Mon May  1 10:12:59 2017
New Revision: 317644
URL: https://svnweb.freebsd.org/changeset/base/317644

Log:
  Fix casting and format.
  
  Reported by:	 kib
  Sponsored by:	Dell EMC Isilon

Modified:
  user/pho/stress2/misc/kinfo2.sh
  user/pho/stress2/misc/namecache.sh

Modified: user/pho/stress2/misc/kinfo2.sh
==============================================================================
--- user/pho/stress2/misc/kinfo2.sh	Mon May  1 08:21:50 2017	(r317643)
+++ user/pho/stress2/misc/kinfo2.sh	Mon May  1 10:12:59 2017	(r317644)
@@ -124,9 +124,9 @@ list(void)
 	dp = (struct dirent *)bp;
 	for (;;) {
 #if defined(DEBUG)
-		printf("name: %-10s, inode %7lu, type %2d, namelen %d, "
+		printf("name: %-10s, inode %7ju, type %2d, namelen %d, "
 		    "d_reclen %d\n",
-		    dp->d_name, (unsigned long)dp->d_fileno, dp->d_type,
+		    dp->d_name, (uintmax_t)dp->d_fileno, dp->d_type,
 		    dp->d_namlen, dp->d_reclen); fflush(stdout);
 #endif
 

Modified: user/pho/stress2/misc/namecache.sh
==============================================================================
--- user/pho/stress2/misc/namecache.sh	Mon May  1 08:21:50 2017	(r317643)
+++ user/pho/stress2/misc/namecache.sh	Mon May  1 10:12:59 2017	(r317644)
@@ -144,9 +144,9 @@ pm(void)
 
 			if (stat(dp->d_name, &statb) == -1) {
 				warn("stat(%s)", dp->d_name);
-				printf("name: %-10s, inode %7lu, "
+				printf("name: %-10s, inode %7ju, "
 				    "type %2d, namelen %d, d_reclen %d\n",
-				    dp->d_name, (unsigned long)dp->d_fileno, dp->d_type,
+				    dp->d_name, (uintmax_t)dp->d_fileno, dp->d_type,
 				    dp->d_namlen, dp->d_reclen);
 				fflush(stdout);
 			} else {



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