comparison cmd.c @ 41:0af8d2d8cd1a

Improve error message of removegroup command The removegroup comman may also fail if the group is not empty.
author Guido Berhoerster <guido+pwm@berhoerster.name>
date Tue, 20 Aug 2019 20:19:53 +0200
parents e3ad9859c51d
children
comparison
equal deleted inserted replaced
40:e3ad9859c51d 41:0af8d2d8cd1a
1174 pwm_err(ctx, "cannot remove groups in read-only mode"); 1174 pwm_err(ctx, "cannot remove groups in read-only mode");
1175 return (CMD_ERR); 1175 return (CMD_ERR);
1176 } 1176 }
1177 1177
1178 if (pwfile_remove_group(ctx, argv[1]) != 0) { 1178 if (pwfile_remove_group(ctx, argv[1]) != 0) {
1179 pwm_err(ctx, "empty group \"%s\" does not exist", argv[1]); 1179 pwm_err(ctx, "group \"%s\" is not empty or does not exist", argv[1]);
1180 return (CMD_ERR); 1180 return (CMD_ERR);
1181 } 1181 }
1182 1182
1183 return (CMD_OK); 1183 return (CMD_OK);
1184 } 1184 }