aboutsummaryrefslogtreecommitdiff
path: root/bin/rm/rm.c
diff options
context:
space:
mode:
authorEnji Cooper <ngie@FreeBSD.org>2017-11-05 21:43:26 +0000
committerEnji Cooper <ngie@FreeBSD.org>2017-11-05 21:43:26 +0000
commit6f74a1c9525640ad47ff5755074b1869c187a589 (patch)
treef6202badd1740521b6d8d38c8bc5d331766be851 /bin/rm/rm.c
parent792bc2226603e024afa1c5895e2009c76ad23513 (diff)
downloadsrc-6f74a1c9525640ad47ff5755074b1869c187a589.tar.gz
src-6f74a1c9525640ad47ff5755074b1869c187a589.zip
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>
Notes
Notes: svn path=/head/; revision=325450
Diffstat (limited to 'bin/rm/rm.c')
-rw-r--r--bin/rm/rm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/rm/rm.c b/bin/rm/rm.c
index bb05aac6cac9..af3322199408 100644
--- a/bin/rm/rm.c
+++ b/bin/rm/rm.c
@@ -515,7 +515,7 @@ check(const char *path, const char *name, struct stat *sp)
"%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 ? " " : "",