Fwd: swapon and swapoff testcases on busybox

Luciano Miguel Ferreira Rocha strange at nsk.no-ip.org
Tue Mar 13 22:22:13 UTC 2007


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".

> > Why is it that the block size has been hard code to 512 bytes? Any
> > particular reason for that?
> 
> Hmmm... dunno! ;)

Because that's the size of each block for st_blocks.

-- 
lfr
0/0
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.busybox.net/pipermail/busybox/attachments/20070313/9f61ba9c/attachment-0002.pgp 


More information about the busybox mailing list