Re: [PATCH v2 2/4] unshare: new applet

2016-03-14 Thread Bartosz Gołaszewski
2016-03-14 15:11 GMT+01:00 Mike Frysinger : > On 14 Mar 2016 11:08, Bartosz Gołaszewski wrote: >> 2016-03-11 18:24 GMT+01:00 Mike Frysinger : >> > On 11 Mar 2016 18:10, Bartosz Golaszewski wrote: >> >> +int unshare_main(int argc UNUSED_PARAM, char **argv) >> >> +{ >> >> + static struct namespac

Re: [PATCH v2 2/4] unshare: new applet

2016-03-14 Thread Mike Frysinger
On 14 Mar 2016 11:08, Bartosz Gołaszewski wrote: > 2016-03-11 18:24 GMT+01:00 Mike Frysinger : > > 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'r

Re: [PATCH v2 2/4] unshare: new applet

2016-03-14 Thread Bartosz Gołaszewski
2016-03-11 18:24 GMT+01:00 Mike Frysinger : > 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. >> + { >>

Re: [PATCH v2 2/4] unshare: new applet

2016-03-11 Thread Mike Frysinger
On 11 Mar 2016 18:10, Bartosz Golaszewski wrote: > +int unshare_main(int argc UNUSED_PARAM, char **argv) > +{ > + static struct namespace ns_list[] = { const ? > + { > +#define NS_MNT_POS 0 perhaps an alternate way of handling these indices: enum { NS_MNT_

[PATCH v2 2/4] unshare: new applet

2016-03-11 Thread Bartosz Golaszewski
Add a fully featured unshare implementation implementing all arguments supported in the upstream version. Signed-off-by: Bartosz Golaszewski --- util-linux/unshare.c | 450 +++ 1 file changed, 450 insertions(+) create mode 100644 util-linux/unshar