projects
/
pintos-anon
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add EXIT_FAILURE, EXIT_SUCCESS to syscall.h,
[pintos-anon]
/
src
/
examples
/
rm.c
diff --git
a/src/examples/rm.c
b/src/examples/rm.c
index 2f1ce730b735a48eafa440429ddb796fbe17aca8..0db7f7b2aedfa8e98a221d3c685f67ca393a18fc 100644
(file)
--- a/
src/examples/rm.c
+++ b/
src/examples/rm.c
@@
-8,10
+8,14
@@
int
main (int argc, char *argv[])
{
int
main (int argc, char *argv[])
{
+ bool success = true;
int i;
for (i = 1; i < argc; i++)
int i;
for (i = 1; i < argc; i++)
- if (!remove (argv[i]))
- printf ("%s: remove failed\n", argv[i]);
- return 0;
+ if (!remove (argv[i]))
+ {
+ printf ("%s: remove failed\n", argv[i]);
+ success = false;
+ }
+ return success ? EXIT_SUCCESS : EXIT_FAILURE;
}
}