From b5f0874cd96ee2a62aabc645b9626c2749cb6a01 Mon Sep 17 00:00:00 2001 From: manuel Date: Mon, 26 Mar 2012 12:54:45 +0200 Subject: initial pintos checkin --- pintos-progos/examples/rm.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 pintos-progos/examples/rm.c (limited to 'pintos-progos/examples/rm.c') diff --git a/pintos-progos/examples/rm.c b/pintos-progos/examples/rm.c new file mode 100644 index 0000000..0db7f7b --- /dev/null +++ b/pintos-progos/examples/rm.c @@ -0,0 +1,21 @@ +/* rm.c + + Removes files specified on command line. */ + +#include +#include + +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]); + success = false; + } + return success ? EXIT_SUCCESS : EXIT_FAILURE; +} -- cgit v1.2.3