>Synopsis: rm -rf "" # prints error message but should be silent
>Category: system
>Environment:
System : OpenBSD 5.9
Details : OpenBSD 5.9 (GENERIC.MP) #1888: Fri Feb 26 01:20:19 MST
2016
[email protected]:/usr/src/sys/arch/amd64/compile/GENERIC.MP
Architecture: OpenBSD.amd64
Machine : amd64
>Description:
The command:
rm -rf ""
prints to STDERR:
rm: No such file or directory
but it should print nothing because of the -f flag.
Note that the command:
rm -rf nonexistant
does not print anything to STDERR.
This only happens with the empty arg "".
I compiled /usr/src/bin/rm from CURRENT and tested it, and it exhibits
the same issue.
>How-To-Repeat:
Run the command:
rm -rf ""
>Fix:
dmesg:
OpenBSD 5.9 (GENERIC.MP) #1888: Fri Feb 26 01:20:19 MST 2016
[email protected]:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 3162427392 (3015MB)
avail mem = 3062382592 (2920MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.7 @ 0xaffed000 (24 entries)
bios0: vendor Parallels Software International Inc. version "11.2.0 (32581)"
date 04/27/2016
bios0: Parallels Software International Inc. Parallels Virtual Platform
acpi0 at bios0: rev 2
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP APIC HPET OEM1
acpi0: wakeup devices EXP1(S4) EXP2(S4) EXP3(S4) EXP4(S4) EXP5(S4) EXP6(S4)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM) i7-2635QM CPU @ 2.00GHz, 1995.71 MHz
cpu0:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,SS,HTT,SSE3,PCLMUL,SSSE3,CX16,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,HV,NXE,LONG,LAHF,ITSC,SENSOR,ARAT
cpu0: 256KB 64b/line 8-way L2 cache
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges
cpu0: apic clock running at 99MHz
cpu1 at mainbus0: apid 1 (application processor)
cpu1: Intel(R) Core(TM) i7-2635QM CPU @ 2.00GHz, 1995.31 MHz
cpu1:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,SS,HTT,SSE3,PCLMUL,SSSE3,CX16,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,HV,NXE,LONG,LAHF,ITSC,SENSOR,ARAT
cpu1: 256KB 64b/line 8-way L2 cache
cpu1: smt 0, core 1, package 0
cpu2 at mainbus0: apid 2 (application processor)
cpu2: Intel(R) Core(TM) i7-2635QM CPU @ 2.00GHz, 1995.33 MHz
cpu2:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,SS,HTT,SSE3,PCLMUL,SSSE3,CX16,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,HV,NXE,LONG,LAHF,ITSC,SENSOR,ARAT
cpu2: 256KB 64b/line 8-way L2 cache
cpu2: smt 0, core 2, package 0
cpu3 at mainbus0: apid 3 (application processor)
cpu3: Intel(R) Core(TM) i7-2635QM CPU @ 2.00GHz, 1995.31 MHz
cpu3:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,SS,HTT,SSE3,PCLMUL,SSSE3,CX16,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,HV,NXE,LONG,LAHF,ITSC,SENSOR,ARAT
cpu3: 256KB 64b/line 8-way L2 cache
cpu3: smt 0, core 3, package 0
cpu4 at mainbus0: apid 4 (application processor)
cpu4: Intel(R) Core(TM) i7-2635QM CPU @ 2.00GHz, 1995.33 MHz
cpu4:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,SS,HTT,SSE3,PCLMUL,SSSE3,CX16,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,HV,NXE,LONG,LAHF,ITSC,SENSOR,ARAT
cpu4: 256KB 64b/line 8-way L2 cache
cpu4: smt 0, core 4, package 0
cpu5 at mainbus0: apid 5 (application processor)
cpu5: Intel(R) Core(TM) i7-2635QM CPU @ 2.00GHz, 1995.35 MHz
cpu5:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,SS,HTT,SSE3,PCLMUL,SSSE3,CX16,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,HV,NXE,LONG,LAHF,ITSC,SENSOR,ARAT
cpu5: 256KB 64b/line 8-way L2 cache
cpu5: smt 0, core 5, package 0
cpu6 at mainbus0: apid 6 (application processor)
cpu6: Intel(R) Core(TM) i7-2635QM CPU @ 2.00GHz, 1995.35 MHz
cpu6:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,SS,HTT,SSE3,PCLMUL,SSSE3,CX16,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,HV,NXE,LONG,LAHF,ITSC,SENSOR,ARAT
cpu6: 256KB 64b/line 8-way L2 cache
cpu6: smt 0, core 6, package 0
cpu7 at mainbus0: apid 7 (application processor)
cpu7: Intel(R) Core(TM) i7-2635QM CPU @ 2.00GHz, 2030.15 MHz
cpu7:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,SS,HTT,SSE3,PCLMUL,SSSE3,CX16,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,HV,NXE,LONG,LAHF,ITSC,SENSOR,ARAT
cpu7: 256KB 64b/line 8-way L2 cache
cpu7: smt 0, core 7, package 0
ioapic0 at mainbus0: apid 0 pa 0xfec00000, version 2, 24 pins
acpihpet0 at acpi0: 16000000 Hz
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus 1 (PX16)
acpiprt2 at acpi0: bus 2 (PCIN)
acpiprt3 at acpi0: bus 3 (PCI2)
acpiprt4 at acpi0: bus -1 (EXP1)
acpiprt5 at acpi0: bus -1 (EXP2)
acpiprt6 at acpi0: bus -1 (EXP3)
acpiprt7 at acpi0: bus -1 (EXP4)
acpiprt8 at acpi0: bus -1 (EXP5)
acpiprt9 at acpi0: bus -1 (EXP6)
acpiec0 at acpi0: not present
acpicpu0 at acpi0: C1(1000@20 halt)
acpicpu1 at acpi0: C1(1000@20 halt)
acpicpu2 at acpi0: C1(1000@20 halt)
acpicpu3 at acpi0: C1(1000@20 halt)
acpicpu4 at acpi0: C1(1000@20 halt)
acpicpu5 at acpi0: C1(1000@20 halt)
acpicpu6 at acpi0: C1(1000@20 halt)
acpicpu7 at acpi0: C1(1000@20 halt)
acpiac0 at acpi0: AC unit online
acpibat0 at acpi0: BAT0 not present
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "Intel 82G965 Host" rev 0x02
ppb0 at pci0 dev 1 function 0 "Intel 82G35 PCIE" rev 0x02: msi
pci1 at ppb0 bus 1
vga1 at pci1 dev 0 function 0 unknown vendor 0x1ab8 product 0x4005 rev 0x00
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
unknown vendor 0x1ab8 product 0x4000 (class undefined unknown subclass 0x00,
rev 0x00) at pci0 dev 3 function 0 not configured
em0 at pci0 dev 5 function 0 "Intel 82545EM" rev 0x00: apic 0 int 23, address
00:1c:42:d2:76:e5
ppb1 at pci0 dev 10 function 0 "DEC 21150" rev 0x00
pci2 at ppb1 bus 2
ppb2 at pci0 dev 30 function 0 "Intel 82801BA Hub-to-PCI" rev 0xf2
pci3 at ppb2 bus 3
pcib0 at pci0 dev 31 function 0 "Intel 82801H LPC" rev 0x02
pciide0 at pci0 dev 31 function 1 "Intel 82801BA IDE" rev 0x05: DMA, channel 0
wired to compatibility, channel 1 wired to compatibility
wd0 at pciide0 channel 0 drive 0: <OpenBSD-0 SSD>
wd0: 128-sector PIO, LBA48, 131072MB, 268435456 sectors
atapiscsi0 at pciide0 channel 0 drive 1
scsibus1 at atapiscsi0: 2 targets
cd0 at scsibus1 targ 0 lun 0: <, Virtual DVD-ROM, R103> ATAPI 5/cdrom removable
wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 5
cd0(pciide0:0:1): using PIO mode 4, Ultra-DMA mode 1
pciide0: channel 1 disabled (no drives)
ichiic0 at pci0 dev 31 function 3 "Intel 82801H SMBus" rev 0x02: SMBus disabled
auich0 at pci0 dev 31 function 4 "Intel 82801BA AC97" rev 0x02: apic 0 int 17,
ICH2 AC97
ac97: codec id 0x414c4790 (Avance Logic ALC850 rev 0)
ac97: codec features 20 bit DAC, No 3D Stereo
audio0 at auich0
isa0 at pcib0
isadma0 at isa0
fdc0 at isa0 port 0x3f0/6 irq 6 drq 2
fd0 at fdc0 drive 0: 1.44MB 80 cyl, 2 head, 18 sec
pckbc0 at isa0 port 0x60/5 irq 1 irq 12
pckbd0 at pckbc0 (kbd slot)
wskbd0 at pckbd0: console keyboard, using wsdisplay0
pms0 at pckbc0 (aux slot)
wsmouse0 at pms0 mux 0
pcppi0 at isa0 port 0x61
spkr0 at pcppi0
vscsi0 at root
scsibus2 at vscsi0: 256 targets
softraid0 at root
scsibus3 at softraid0: 256 targets
root on wd0a (414a120a61a15dbc.a) swap on wd0b dump on wd0b
WARNING: / was not properly unmounted
usbdevs:
usbdevs: no USB controllers found