diff options
| author | Warner Losh <imp@FreeBSD.org> | 2001-03-02 07:30:37 +0000 |
|---|---|---|
| committer | Warner Losh <imp@FreeBSD.org> | 2001-03-02 07:30:37 +0000 |
| commit | 003ff9433b67b3272da4fc9f8dcd9c2de2120589 (patch) | |
| tree | e97e0657f9fcf0da97c2f2a2bcf7feb009df7c9d /usr.bin | |
| parent | 5f5aafe1fcdeb8cd06e03569f45f947d3a75b040 (diff) | |
Notes
Diffstat (limited to 'usr.bin')
| -rw-r--r-- | usr.bin/wall/wall.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.bin/wall/wall.c b/usr.bin/wall/wall.c index 45063868dddae..25cb7865af580 100644 --- a/usr.bin/wall/wall.c +++ b/usr.bin/wall/wall.c @@ -126,8 +126,10 @@ main(int argc, char *argv[]) for (g = grouplist; g; g = g->next) { grp = getgrnam(g->name); - if (grp) + if (grp != NULL) g->gid = grp->gr_gid; + else + warnx("%s: no such group", g->name); } makemsg(*argv); @@ -170,7 +172,7 @@ main(int argc, char *argv[]) static void usage() { - (void)fprintf(stderr, "usage: wall [file]\n"); + (void)fprintf(stderr, "usage: wall [-g group] [file]\n"); exit(1); } |
