Date: Mon, 7 Oct 2013 11:23:01 +0000 (UTC) From: Dag-Erling Smørgrav <des@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r256107 - head/usr.bin/kdump Message-ID: <201310071123.r97BN1CS056068@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: des Date: Mon Oct 7 11:23:01 2013 New Revision: 256107 URL: http://svnweb.freebsd.org/changeset/base/256107 Log: When displaying a struct stat, if the -r option was not specified, display the numeric rather than symbolic representation of st_mode. Approved by: re (glebius) MFC after: 1 week Modified: head/usr.bin/kdump/kdump.c Modified: head/usr.bin/kdump/kdump.c ============================================================================== --- head/usr.bin/kdump/kdump.c Mon Oct 7 10:26:38 2013 (r256106) +++ head/usr.bin/kdump/kdump.c Mon Oct 7 11:23:01 2013 (r256107) @@ -1655,10 +1655,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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201310071123.r97BN1CS056068>