aboutsummaryrefslogtreecommitdiff
path: root/coreutils/chmod.c
diff options
context:
space:
mode:
Diffstat (limited to 'coreutils/chmod.c')
-rw-r--r--coreutils/chmod.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/coreutils/chmod.c b/coreutils/chmod.c
index e260adab2..5832cc51b 100644
--- a/coreutils/chmod.c
+++ b/coreutils/chmod.c
@@ -88,10 +88,12 @@ static int FAST_FUNC fileAction(struct recursive_state *state,
88 88
89 if (chmod(fileName, newmode) == 0) { 89 if (chmod(fileName, newmode) == 0) {
90 if (OPT_VERBOSE 90 if (OPT_VERBOSE
91 || (OPT_CHANGED && statbuf->st_mode != newmode) 91 || (OPT_CHANGED
92 && (statbuf->st_mode & 07777) != (newmode & 07777))
92 ) { 93 ) {
94 char modestr[12];
93 printf("mode of '%s' changed to %04o (%s)\n", fileName, 95 printf("mode of '%s' changed to %04o (%s)\n", fileName,
94 newmode & 07777, bb_mode_string(newmode)+1); 96 newmode & 07777, bb_mode_string(modestr, newmode)+1);
95 } 97 }
96 return TRUE; 98 return TRUE;
97 } 99 }