Change the usage() message to include the recently-added -4 and -6 options.

This commit is contained in:
Garance A Drosehn 2001-03-12 02:03:53 +00:00
parent 6a30de0e1c
commit affa003946
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=74127

View File

@ -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 @@ chkhost(f)
/*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);
}