Bug 4087

Summary: Swapoff applet broken in BusyBox 1.19.0
Product: Busybox Reporter: Dennis Groenen <tj.groenen>
Component: OtherAssignee: unassigned
Status: RESOLVED FIXED    
Severity: major CC: busybox-cvs
Priority: P5    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Host: Target:
Build:

Description Dennis Groenen 2011-08-24 15:23:33 UTC
The swapoff applet seems to be broken in BusyBox 1.19.0. I suppose this is caused by some change in libbb/getopt32.c, since this is the place where the error is coming from.

Steps to reproduce:
1) download & extract BusyBox 1.19.0 source
2) make defconfig && make
3) ./busybox swapoff

Outcome:
[root@i7-820qm busybox-1.19.0]# ./busybox swapoff
swapoff: NO OPT p!

Additional information:
The same happens when arguments are passed to swapoff
[root@i7-820qm busybox-1.19.0]# ./busybox swapoff -a
swapoff: NO OPT p!
[root@i7-820qm busybox-1.19.0]# ./busybox swapoff /dev/sda4
swapoff: NO OPT p!

This problem occurs on both my laptop (output above) and an ARM device (Nokia N900).

P.s. there's no "1.19.x" in the "Version" listbox of BusyBox' bugtracker yet, so I'll set the version to "unspecified".
Comment 1 Dennis Groenen 2011-08-25 10:21:58 UTC
Just noticed there's already a hotfix for this (http://busybox.net/downloads/fixes-1.19.0/busybox-1.19.0-swap.patch). I'm sorry for the bugtracker noise. Closing this bug as resolved.