Fix return values in rm(1) and mv(1)

by setting rm_status to 1 if removing 1 file in the list fails.
Extend this to mv_status in mv(1).
This commit is contained in:
FRIGN
2015-01-30 12:45:54 +01:00
parent a9c7d16cde
commit e60885699c
4 changed files with 26 additions and 20 deletions

2
rm.c
View File

@@ -41,5 +41,5 @@ main(int argc, char *argv[])
for (; argc > 0; argc--, argv++)
rm(argv[0]);
return 0;
return rm_status;
}