svn commit: r270459 - stable/9/usr.bin/kdump

Dag-Erling Smørgrav des at FreeBSD.org
Sun Aug 24 14:00:45 UTC 2014


Author: des
Date: Sun Aug 24 14:00:44 2014
New Revision: 270459
URL: http://svnweb.freebsd.org/changeset/base/270459

Log:
  MFH (r270458): print numeric file mode unless -r was specified

Modified:
  stable/9/usr.bin/kdump/kdump.c
Directory Properties:
  stable/9/usr.bin/kdump/   (props changed)

Modified: stable/9/usr.bin/kdump/kdump.c
==============================================================================
--- stable/9/usr.bin/kdump/kdump.c	Sun Aug 24 13:03:51 2014	(r270458)
+++ stable/9/usr.bin/kdump/kdump.c	Sun Aug 24 14:00:44 2014	(r270459)
@@ -1522,10 +1522,15 @@ ktrstat(struct stat *statp)
 	 * buffer exactly sizeof(struct stat) bytes long.
 	 */
 	printf("struct stat {");
-	strmode(statp->st_mode, mode);
-	printf("dev=%ju, ino=%ju, mode=%s, nlink=%ju, ",
-		(uintmax_t)statp->st_dev, (uintmax_t)statp->st_ino, mode,
-		(uintmax_t)statp->st_nlink);
+	printf("dev=%ju, ino=%ju, ",
+		(uintmax_t)statp->st_dev, (uintmax_t)statp->st_ino);
+	if (resolv == 0)
+		printf("mode=0%jo, ", (uintmax_t)statp->st_mode);
+	else {
+		strmode(statp->st_mode, mode);
+		printf("mode=%s, ", mode);
+	}
+	printf("nlink=%ju, ", (uintmax_t)statp->st_nlink);
 	if (resolv == 0 || (pwd = getpwuid(statp->st_uid)) == NULL)
 		printf("uid=%ju, ", (uintmax_t)statp->st_uid);
 	else


More information about the svn-src-stable-9 mailing list