[PATCH v2 2/4] unshare: new applet

Bartosz Gołaszewski bartekgola at gmail.com
Mon Mar 14 10:08:46 UTC 2016


2016-03-11 18:24 GMT+01:00 Mike Frysinger <vapier at gentoo.org>:
> On 11 Mar 2016 18:10, Bartosz Golaszewski wrote:
>> +int unshare_main(int argc UNUSED_PARAM, char **argv)
>> +{
>> +     static struct namespace ns_list[] = {
>
> const ?
>

Nope, we're using char *path to store the mount points.

>> +             {
>> +#define NS_MNT_POS 0
>
> perhaps an alternate way of handling these indices:
>         enum {
>                 NS_MNT_POS = 0,
>                 NS_UTS_POS,
>                 NS_IPC_POS,
>                 NS_NET_POS,
>                 ...
>         };
>         static struct namespace ns_list[] = {
>                 [NS_MNT_POS] = {
>                         ...
> -mike

Looks better indeed, fixed in v3.

-- 
Best regards,
Bartosz Golaszewski


More information about the busybox mailing list