From: Subramanian S <hel...@gm...> - 2008-01-07 08:16:05
|
Hi Sir, Happy New Year. We went thru the fusexmp.c program. According to us, what it is actually doing is that: We execute the program with "wow"( wow is a directory), as the argument. Then when we enter "wow" and type the command "ls", it lists all the files in the root folder ( / ). Will you please explain the internal structure of this program? Thanks........ |
From: Miklos S. <mi...@sz...> - 2008-01-07 10:17:51
|
> We went thru the fusexmp.c program. According to us, what it is > actually doing is that: We execute the program with > > "wow"( wow is a directory), as the argument. Then when we enter > "wow" and type the command "ls", it lists all the files > > in the root folder ( / ). Will you please explain the internal > structure of this program? It should be pretty obvious. What part do you not understand? Miklos |
From: Subramanian S <hel...@gm...> - 2008-01-08 04:32:33
|
Hi, It may be due to my ignorance. But, I didn't understand where do you mirror the root directory in the program. Also, I wish to write a program which executes with a temporary folder as the argument. After that, if we mount at the root and give commands, the commands should be executed as they are being executed on the temporary folder. I need your help. Thanks .... |
From: Miklos S. <mi...@sz...> - 2008-01-08 17:33:45
|
> It may be due to my ignorance. But, I didn't understand where do you > mirror > the root directory in the program. In your example, when you do "ls" within the "wow" directory, the xmp_opendir() function will receive "/" as a path. Then the xmp_getattr() function will receive "/foo" (or whatever) as a path. You can see what is happening by giving the "-d" option to fusexmp. > Also, I wish to write a program which executes with a temporary folder > as > the argument. After that, if we mount at the root and give commands, > the > commands should be executed as they are being executed on the temporary > folder. You can make fuse prepend a subdirectory to all paths with the "-omodules=subdir,subdir=/tempdir" option. Miklos |