From 07fdda9725f1c3d6fc1f25e0c230ad38574f7b7e Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Tue, 12 Apr 2011 21:44:11 +0000 Subject: [PATCH] proper error message when no service set --- sys/src/cmd/cwfs/main.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/src/cmd/cwfs/main.c b/sys/src/cmd/cwfs/main.c index b7654e505..9790ad0e8 100644 --- a/sys/src/cmd/cwfs/main.c +++ b/sys/src/cmd/cwfs/main.c @@ -174,6 +174,9 @@ postservice(void) char buf[3*NAMELEN]; int p[2]; + if(service[0] == 0) + panic("no service name"); + if(sfd < 0){ if(pipe(p) < 0) panic("can't make a pipe"); @@ -290,6 +293,7 @@ main(int argc, char **argv) formatinit(); machinit(); conf.confdev = "/dev/sdC0/cwfs"; + strcpy(service, "cwfs"); rfd = sfd = -1;