Fwd: swapon and swapoff testcases on busybox
Bernhard Fischer
rep.dot.nop at gmail.com
Wed Mar 14 01:31:09 PDT 2007
On Tue, Mar 13, 2007 at 10:22:13PM +0000, Luciano Miguel Ferreira Rocha wrote:
>On Tue, Mar 13, 2007 at 10:10:05PM +0100, Denis Vlasenko wrote:
>> Hi
>>
>> On Tuesday 13 March 2007 08:44, Riaz Rahaman wrote:
>> > BTW..the bb swaponoff file checks for the condition (st.st_blocks * 512 <
>> > st.st_size) and gives a message if the swap file has holes...now do we
>> > require this check in the busybox? can bb not call the swapon syscall from
>> > swaponoff code..swapon syscall also seems to be doing the check.
>>
>> I removed that check.
>
>It was better with the check. Swap file with holes isn't supported by
>linux, and that check would give the correct error message, instead of
>the cryptic "invlaid argument".
seconded. OTOH it's a pure cosmetic issue and we try to be small, so the
check may be considered a bit of bloat since an elaborate error is
likely to be found in the error-logs nonetheless:
bad_bmap:
printk(KERN_ERR "swapon: swapfile has holes\n");
ret = -EINVAL;
More information about the busybox
mailing list