>Synopsis: expand(1) manual documents non-existant "-a" option
>Category: documentation
>Environment:
System : OpenBSD 6.2
Details : OpenBSD 6.2 (GENERIC.MP) #0: Thu Oct 12 19:53:18 CEST 2017
r...@syspatch-62-amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
Architecture: OpenBSD.amd64
Machine : amd64
>Description:
The documentation of the expand(1) utility contains references to an
option "-a":
-aBy default, only leading blanks and tabs are reconverted to maximal
strings of tabs. If the -a option is given, tabs are inserted
whenever they would compress the resultant file by replacing two or
more characters.
However, this option is not implemented:
while ((c = getopt (argc, argv, "t:")) != -1) {
switch (c) {
case 't':
getstops(optarg);
break;
case '?':
default:
usage();
/* NOTREACHED */
}
}
>How-To-Repeat:
Type "man expand", read.
Then:
$ expand -a somefile
expand: unknown option -- a
usage: expand [-t tablist] [file ...]
>Fix:
The "-a" option is not part of the POSIX spec for this utility,
and there's no dead code in expand.c that implments it. I would
therefore suggest just removing the mentioning of "-a" from expand.1.
Alternatively, implement the option according to the manual.
dmesg:
OpenBSD 6.2 (GENERIC.MP) #0: Thu Oct 12 19:53:18 CEST 2017
r...@syspatch-62-amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 4278124544 (4079MB)
avail mem = 4141453312 (3949MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.5 @ 0xe1000 (10 entries)
bios0: vendor innotek GmbH version "VirtualBox" date 12/01/2006
bios0: innotek GmbH VirtualBox
acpi0 at bios0: rev 2
acpi0: sleep states S0 S5
acpi0: tables DSDT FACP APIC SSDT
acpi0: wakeup devices
acpitimer0 at acpi0: 3579545 Hz, 32 bits
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM) i7-6600U CPU @ 2.60GHz, 2808.43 MHz
cpu0:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,PCLMUL,SSSE3,CX16,SSE4.1,SSE4.2,MOVBE,POPCNT,AES,XSAVE,AVX,RDRAND,NXE,RDTSCP,LONG,LAHF,ABM,3DNOWP,ITSC,RDSEED,CLFLUSHOPT
cpu0: 256KB 64b/line 8-way L2 cache
cpu0: TSC frequency 2808425220 Hz
cpu0: smt 0, core 0, package 0
mtrr: CPU supports MTRRs but not enabled by BIOS
cpu0: apic clock running at 1000MHz
cpu1 at mainbus0: apid 1 (application processor)
cpu1: Intel(R) Core(TM) i7-6600U CPU @ 2.60GHz, 2808.17 MHz
cpu1:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,PCLMUL,SSSE3,CX16,SSE4.1,SSE4.2,MOVBE,POPCNT,AES,XSAVE,AVX,RDRAND,NXE,RDTSCP,LONG,LAHF,ABM,3DNOWP,ITSC,RDSEED,CLFLUSHOPT
cpu1: 256KB 64b/line 8-way L2 cache
cpu1: smt 0, core 1, package 0
ioapic0 at mainbus0: apid 2 pa 0xfec0, version 20, 24 pins
, remapped to apid 2
acpiprt0 at acpi0: bus 0 (PCI0)
acpicpu0 at acpi0: C1(@1 halt!)
acpicpu1 at acpi0: C1(@1 halt!)
"PNP0F03" at acpi0 not configured
acpibat0 at acpi0: BAT0 model "1" serial 0 type VBOX oem "innotek"
acpiac0 at acpi0: AC unit online
acpivideo0 at acpi0: GFX0
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "Intel 82441FX" rev 0x02
pcib0 at pci0 dev 1 function 0 "Intel 82371SB ISA" rev 0x00
vga1 at pci0 dev 2 function 0 "InnoTek VirtualBox Graphics Adapter" rev 0x00
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
em0 at pci0 dev 3 function 0 "Intel 82540EM" rev 0x02: apic 2 int 19, address
08:00:27:1c:bb:55
"InnoTek VirtualBox Guest Service" rev 0x00 at pci0 dev 4 function 0 not
configured
piixpm0 at pci0 dev 7 function 0 "Intel 82371AB Power" rev 0x08: apic 2 int 23
iic0 at piixpm0
mpi0 at pci0 dev 20 function 0 "Symbios Logic 53c1030" rev 0x00: apic 2 int 20
mpi0: VBox MPT Fusion, firmware 0.0.0.0
scsibus1 at mpi0: 16 targets, initiator 7
cd0 at scsibus1 targ 0 lun 0: SCSI3 5/cdrom removable
sd0 at scsibus1 targ 1 lun 0: SCSI3 0/direct fixed
sd0: 5120MB, 512 bytes/sector, 10485760 sectors
sd1 at scsibus1 targ 2 lun 0: SCSI3 0/direct fixed
sd1: 51200MB, 512 bytes/sector, 104857600 sectors
sd2 at scsibus1 targ 3 lun 0: SCSI3 0/direct fixed
sd2: 51200MB, 512 bytes/sector, 104857600 sectors
mpi0: target 0 Async at 0MHz width 8bit offset 0 QAS 0 DT 0 IU 0
mpi0: target 1 Async at 0MHz width 8bit offset 0 QAS 0 DT 0 IU 0
mpi0: target 2 Async at 0MHz width 8bit offset 0 QAS 0 DT 0 IU 0
mpi0: target 3 Async at 0MHz width 8bit offset 0 QAS 0 DT 0 IU 0
isa0 at pcib0
isadma0 at isa0
pckbc0 at isa0 port 0x60/5 irq 1 irq 12
pckbd0 at pckbc0 (kbd slot)
wskbd0 at pckbd0: console keyboard, using wsdisplay0