diff options
author | gad <gad@FreeBSD.org> | 2001-03-12 02:03:53 +0000 |
---|---|---|
committer | gad <gad@FreeBSD.org> | 2001-03-12 02:03:53 +0000 |
commit | 8f86229fcd74d90d4e4341e0df972120b8f5fa94 (patch) | |
tree | 90e063ba919fd8c22302e6578d1902dbdada0f91 /usr.sbin | |
parent | 0152ddfe77452b76b26fc719ea0382a78519f8e3 (diff) | |
download | FreeBSD-src-8f86229fcd74d90d4e4341e0df972120b8f5fa94.zip FreeBSD-src-8f86229fcd74d90d4e4341e0df972120b8f5fa94.tar.gz |
Change the usage() message to include the recently-added -4 and -6 options.
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/lpr/lpd/lpd.c | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/usr.sbin/lpr/lpd/lpd.c b/usr.sbin/lpr/lpd/lpd.c index a890826..729852a 100644 --- a/usr.sbin/lpr/lpd/lpd.c +++ b/usr.sbin/lpr/lpd/lpd.c @@ -164,8 +164,12 @@ main(argc, argv) inet_flag++; break; case '6': +#ifdef INET6 family = PF_INET6; inet6_flag++; +#else + errx(EX_USAGE, "lpd compiled sans INET6 (IPv6 support)"); +#endif break; default: errs++; @@ -698,13 +702,6 @@ again: /*NOTREACHED*/ } -static void -usage() -{ - fprintf(stderr, "usage: lpd [-dlp] [port#]\n"); - exit(EX_USAGE); -} - /* setup server socket for specified address family */ /* if af is PF_UNSPEC more than one socket may be returned */ /* the returned list is dynamically allocated, so caller needs to free it */ @@ -787,3 +784,14 @@ socksetup(af, options) } return(socks); } + +static void +usage() +{ +#ifdef INET6 + fprintf(stderr, "usage: lpd [-dlp46] [port#]\n"); +#else + fprintf(stderr, "usage: lpd [-dlp] [port#]\n"); +#endif + exit(EX_USAGE); +} |