aboutsummaryrefslogtreecommitdiff
path: root/chmod_chown_chgrp.c
diff options
context:
space:
mode:
Diffstat (limited to 'chmod_chown_chgrp.c')
-rw-r--r--chmod_chown_chgrp.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/chmod_chown_chgrp.c b/chmod_chown_chgrp.c
index e8ccb8156..530c45658 100644
--- a/chmod_chown_chgrp.c
+++ b/chmod_chown_chgrp.c
@@ -64,7 +64,7 @@ static int fileAction(const char *fileName, struct stat *statbuf, void* junk)
64 case CHMOD_APP: 64 case CHMOD_APP:
65 /* Parse the specified modes */ 65 /* Parse the specified modes */
66 if (parse_mode(theMode, &(statbuf->st_mode)) == FALSE) { 66 if (parse_mode(theMode, &(statbuf->st_mode)) == FALSE) {
67 fatalError( "unknown mode: %s\n", theMode); 67 error_msg_and_die( "unknown mode: %s\n", theMode);
68 } 68 }
69 if (chmod(fileName, statbuf->st_mode) == 0) 69 if (chmod(fileName, statbuf->st_mode) == 0)
70 return (TRUE); 70 return (TRUE);
@@ -111,7 +111,7 @@ int chmod_chown_chgrp_main(int argc, char **argv)
111 } 111 }
112 112
113 if (argc == 0 || *argv == NULL) { 113 if (argc == 0 || *argv == NULL) {
114 errorMsg(too_few_args); 114 error_msg(too_few_args);
115 } 115 }
116 116
117 if (whichApp == CHMOD_APP) { 117 if (whichApp == CHMOD_APP) {
@@ -149,24 +149,24 @@ int chmod_chown_chgrp_main(int argc, char **argv)
149 if (*argv == p) 149 if (*argv == p)
150 uid = my_getpwnam(*argv); 150 uid = my_getpwnam(*argv);
151 if (uid == -1) { 151 if (uid == -1) {
152 fatalError( "unknown user name: %s\n", *argv); 152 error_msg_and_die( "unknown user name: %s\n", *argv);
153 } 153 }
154 } 154 }
155 } 155 }
156 156
157 /* Ok, ready to do the deed now */ 157 /* Ok, ready to do the deed now */
158 if (argc < 1) { 158 if (argc < 1) {
159 fatalError(too_few_args); 159 error_msg_and_die(too_few_args);
160 } 160 }
161 while (argc-- > 1) { 161 while (argc-- > 1) {
162 if (recursiveAction (*(++argv), recursiveFlag, FALSE, FALSE, 162 if (recursive_action (*(++argv), recursiveFlag, FALSE, FALSE,
163 fileAction, fileAction, NULL) == FALSE) 163 fileAction, fileAction, NULL) == FALSE)
164 return EXIT_FAILURE; 164 return EXIT_FAILURE;
165 } 165 }
166 return EXIT_SUCCESS; 166 return EXIT_SUCCESS;
167 167
168 bad_group: 168 bad_group:
169 fatalError( "unknown group name: %s\n", groupName); 169 error_msg_and_die( "unknown group name: %s\n", groupName);
170} 170}
171 171
172/* 172/*