[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    Re: losetup patch
From:       Denis Vlasenko <vda.linux () googlemail ! com>
Date:       2006-09-27 14:50:35
Message-ID: 200609271650.35606.vda.linux () googlemail ! com
[Download RAW message or body]

On Wednesday 27 September 2006 13:13, Vladimir Dronnikov wrote:
> Hello, Denis
> 
> Just played with dm-crypt & dmsetup on loopbacked filesystem and noticed that
> BB' losetup lacks mainstream convenient losetup feature -- printing all current associations
> Moreover, BB' losetup behaves quite unfriendly -- e.g., it doesn't like
> # losetup /dev/loop*
> :^)
> Attached is the patch to fix the things
> How about it?

Good patch. Applied.

What follows are just nitpicks, it doesn't mean I didn't like it.


Longer than 80 chars:

        if (opt == 0x3 || opt == 0x4 ) bb_show_usage(); // -d and -o (illegal), -h

(-h option is not needed anyway, --help always works for bbox)


Can fit into stack variable instead:

                char *dev = xstrdup("/dev/loop0");


Inconsistent use of spaces around parentheses:

                for ( c = '0'; c < '8'; ++c ) {
                        dev[9] = c;
                        char *s = query_loop(dev);
                        if ( s ) {
--
vda
_______________________________________________
busybox mailing list
busybox@busybox.net
http://busybox.net/cgi-bin/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic