Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 5 Nov 2017 21:43:26 +0000 (UTC)
From:      Ngie Cooper <ngie@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r325450 - head/bin/rm
Message-ID:  <201711052143.vA5LhQK9089799@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ngie
Date: Sun Nov  5 21:43:26 2017
New Revision: 325450
URL: https://svnweb.freebsd.org/changeset/base/325450

Log:
  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.
  
  MFC after:	3 days
  PR:		76711
  Submitted by:	Vasil Dimov <vd@datamax.bg>

Modified:
  head/bin/rm/rm.c

Modified: head/bin/rm/rm.c
==============================================================================
--- head/bin/rm/rm.c	Sun Nov  5 20:38:40 2017	(r325449)
+++ head/bin/rm/rm.c	Sun Nov  5 21:43:26 2017	(r325450)
@@ -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?201711052143.vA5LhQK9089799>