[Libct] Queries regarding libct_fs_set_private() API

Andrew Vagin avagin at parallels.com
Tue Feb 17 02:39:53 PST 2015


On Fri, Feb 06, 2015 at 10:59:42PM +0000, Monali Porob wrote:
> Hi Andrew ,
> 
>  
> 
> W.rt the mount namespace libct APIs , I wanted to know a bit more on how the
> libct_fs_set_private() API is useful .
> 
> Qn 1: What is the use case where I need this .  Please could you provide some
> pointers here .

libct_fs_set_private() can be used to mount a root directory for a
container.

...

> 
> 	libct_fs_set_root(ct, FS_ROOT);
> 	
> 	libct_fs_add_bind_mount(ct, FS_EXT_BIN, FS_CT_BIN, 0);
> 	libct_fs_add_bind_mount(ct, FS_EXT_LIB, FS_CT_LIB, 0);
> 	libct_fs_add_bind_mount(ct, FS_EXT_LIB64, FS_CT_LIB64, 0);
> 
> 
> 	libct_fs_add_mount(ct, "test_devpts", FS_PTS, 0, "devpts", "newinstance");
> 	libct_fs_set_private(ct, CT_FS_SUBDIR, FS_PRIVATE);

I think you need to call libct_fs_add_bind_mount instead of
libct_fs_set_private.



More information about the Libct mailing list