Add EXIT_FAILURE, EXIT_SUCCESS to syscall.h,
[pintos-anon] / src / examples / rm.c
index 2f1ce730b735a48eafa440429ddb796fbe17aca8..0db7f7b2aedfa8e98a221d3c685f67ca393a18fc 100644 (file)
@@ -8,10 +8,14 @@
 int
 main (int argc, char *argv[]) 
 {
+  bool success = true;
   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;
 }