rm: accept and ignore -f

This commit is contained in:
K. Lange 2023-04-26 23:16:03 +09:00
parent d2cff8331c
commit 6827c5d506

View File

@ -62,11 +62,14 @@ static int rm_thing(char * tmp) {
int main(int argc, char * argv[]) {
int opt;
while ((opt = getopt(argc, argv, "r")) != -1) {
while ((opt = getopt(argc, argv, "fr")) != -1) {
switch (opt) {
case 'r':
recursive = 1;
break;
case 'f':
/* ignore */
break;
default:
fprintf(stderr, "rm: unrecognized option '%c'\n", opt);
break;