changeset 2:89e9d591748d

Fix bug of usage for vd_watchdog, and add Makefile
author Thinker K.F. Li <thinker@branda.to>
date Tue, 08 Jul 2008 11:17:01 +0800
parents 0b9854adb86c
children 60a234c9c03f
files vd_watchdog/Makefile vd_watchdog/vd_watchdog.c
diffstat 2 files changed, 16 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/vd_watchdog/Makefile	Tue Jul 08 11:17:01 2008 +0800
@@ -0,0 +1,15 @@
+BIN=vd_watchdog
+SRCS=vd_watchdog.c
+OBJS = vd_watchdog.o
+CFLAGS=-Wall -I..
+
+$(BIN): $(OBJS)
+	$(CC) -o $@ $(OBJS)
+
+.c.o:
+	$(CC) $(CFLAGS) -c $(.ALLSRC)
+
+clean:
+	for f in $(OBJS) *~ $(BIN); do \
+		if [ -e $$f ]; then echo "deleting $$f"; rm -f "$$f"; fi; \
+	done
--- a/vd_watchdog/vd_watchdog.c	Tue Jul 08 11:07:31 2008 +0800
+++ b/vd_watchdog/vd_watchdog.c	Tue Jul 08 11:17:01 2008 +0800
@@ -71,7 +71,7 @@
 
 static void
 usage(const char *prog) {
-    fprintf(stderr, "Usage: %s [-msMH] <timeout>\n");
+    fprintf(stderr, "Usage: %s [-msMH] <timeout>\n", prog);
     fprintf(stderr, "\t-s\tcount in seconds.\n");
     fprintf(stderr, "\t-M\tcount in minutes.\n");
     fprintf(stderr, "\t-m\tcount in hours.\n");