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

List:       klik-devel
Subject:    Re: [klik-devel] strace question
From:       Lionel Tricon <lionel.tricon () free ! fr>
Date:       2008-01-27 22:22:57
Message-ID: 200801272322.57098.lionel.tricon () free ! fr
[Download RAW message or body]

Hi again,

At first, you need to learn how fuse work. In fact, it's really simple since 
you just have to register and "rewrite" a list of system calls.

Put a glance into the fs.c file located into the 
virtualization/unionfuse/trunk/klikfuse/src directory.

All system calls are listed here :
 *  fs_real_opendir
 *  fs_real_readdir
 *  fs_real_getattr
 *  fs_real_readlink
 *  fs_real_open
 *  fs_real_read
 *  fs_real_statfs
 *  fs_real_write
 *  fs_real_access
 *  fs_real_mknod
 *  fs_real_unlink
 *  fs_real_rmdir
 *  fs_real_mkdir
 *  fs_real_symlink
 *  fs_real_rename
 *  fs_real_link
 *  fs_real_chmod
 *  fs_real_chown
 *  fs_real_truncate
 *  fs_real_utime
 *  fs_real_setxattr
 *  fs_real_getxattr
 *  fs_real_listxattr
 *  fs_real_removexattr

The vast majority of them cost less than 30 lines. Not really difficult to 
understand indeed. The iso or cram specific are located into others files and 
it's not really essential to understand them at first. Fortunately, the isofs 
or cramfs code is quite stable ....

Fakechroot work in a similar way ; you need to overload some system calls to 
ensure that the path(s) are relative to the jail and not absolute to the root 
filesystem. The main job of this library is to rewrite paths ... really easy 
to understand.

Both are written in C.

If you have questions, don't hesitate to contact me and the mailing-list.

Lionel

On Monday 21 January 2008 08:30:37 RazZziel wrote:
> Hi there,
>
> I have no idea about the specific fuseiso code, but in general terms,
> hope this helps:
> http://ask.slashdot.org/article.pl?sid=08/01/18/1554257
>
> Ismael
>
> On Jan 21, 2008 9:05 AM, Ng, Cheon-woei <cheon-woei.ng@intel.com> wrote:
> > Hi Lionel,
> >
> > Thank you for your excellent explanations!  I wish to understand how
> > fuseios and fakechroot works in the source code level by following the
> > code paths, but without doing too many grep.  May be using cscope or
> > doxygen would help?  Do you have any other suggestions?  Thanks!
> >
> > Sincerely,
> > Cheon-Woei Ng
_______________________________________________
klik-devel mailing list
klik-devel@kde.org
https://mail.kde.org/mailman/listinfo/klik-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

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