Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 3 Mar 2018 11:12:09 +0000 (UTC)
From:      Eitan Adler <eadler@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r330331 - stable/11/bin/rm
Message-ID:  <201803031112.w23BC9ki050980@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: eadler
Date: Sat Mar  3 11:12:09 2018
New Revision: 330331
URL: https://svnweb.freebsd.org/changeset/base/330331

Log:
  MFC r325450:
  
  Fix cosmetic nit when printing out "override $mode" and "$owner/$group ..."
  
  The wrong index was being checked for == ' ' in the resulting stringified
  mode from strmode(3) -- it should have been the 11th value, not the 10th.
  
  PR:		76711

Modified:
  stable/11/bin/rm/rm.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/bin/rm/rm.c
==============================================================================
--- stable/11/bin/rm/rm.c	Sat Mar  3 11:11:07 2018	(r330330)
+++ stable/11/bin/rm/rm.c	Sat Mar  3 11:12:09 2018	(r330331)
@@ -515,7 +515,7 @@ check(const char *path, const char *name, struct stat 
 			    "%s: -P was specified, but file is not writable",
 			    path);
 		(void)fprintf(stderr, "override %s%s%s/%s %s%sfor %s? ",
-		    modep + 1, modep[9] == ' ' ? "" : " ",
+		    modep + 1, modep[10] == ' ' ? "" : " ",
 		    user_from_uid(sp->st_uid, 0),
 		    group_from_gid(sp->st_gid, 0),
 		    *flagsp ? flagsp : "", *flagsp ? " " : "",



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