Add a dummy -s option for SUSv2 compatibility.
PR: 17256 Reported by: Brooks Davis <brooks@one-eyed-alien.net> Approved by: jkh (release engineer)
This commit is contained in:
parent
e3b82d958e
commit
843422401a
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=57816
@ -41,7 +41,7 @@
|
||||
.Nd front-end to the print spooler
|
||||
.Sh SYNOPSIS
|
||||
.Nm lp
|
||||
.Op Fl c
|
||||
.Op Fl cs
|
||||
.Op Fl d Ar printer
|
||||
.Op Fl n Ar num
|
||||
.Op Ar name ...
|
||||
@ -78,6 +78,11 @@ are taken as the destination printer.
|
||||
Specify that
|
||||
.Ar num
|
||||
copies of each of the named files shall be printed.
|
||||
.It Fl s
|
||||
Silent operation.
|
||||
Not supported,
|
||||
provided only as a compatibility option for
|
||||
.St -susv2 .
|
||||
.El
|
||||
.Sh ENVIRONMENT
|
||||
As described above, the variables
|
||||
|
@ -48,8 +48,10 @@ dest=${LPDEST:-${PRINTER:-lp}}
|
||||
#
|
||||
# XXX We include the -o flag as a dummy. Posix 1003.2 does not require
|
||||
# it, but the rationale mentions it as a possible future extension.
|
||||
# XXX We include the -s flag as a dummy. SUSv2 requires it,
|
||||
# although we do not yet emit the affected messages.
|
||||
#
|
||||
while getopts "cd:n:o:" option
|
||||
while getopts "cd:n:o:s" option
|
||||
do
|
||||
case $option in
|
||||
|
||||
@ -61,6 +63,8 @@ do
|
||||
ncopies="-#${OPTARG}";;
|
||||
o) # (printer option)
|
||||
: ;;
|
||||
s) # (silent option)
|
||||
: ;;
|
||||
*) # (error msg printed by getopts)
|
||||
exit 2;;
|
||||
esac
|
||||
|
Loading…
Reference in New Issue
Block a user