Manish,<br><br><div class="gmail_quote">On Wed, Dec 29, 2010 at 3:36 PM, Manish Katiyar <span dir="ltr"><<a href="mailto:mkatiyar@gmail.com">mkatiyar@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">On Wed, Dec 29, 2010 at 12:21 PM, dinesh bhaskar <<a href="mailto:pdineshb@gmail.com">pdineshb@gmail.com</a>> wrote:<br>
> Hello All,<br>
><br>
> I am trying to modify the path of the file while creating it. I was<br>
> modifying the mkdir function pointer in the inode_operations structure. Not<br>
> sure how to give the specific path to the file while creating it.<br>
<br>
</div>Sorry, but your question is not clear to me. Perhaps rephrasing it<br>
(with an example) will be better.<br></blockquote><div> <br>I am working on ramfs filesystem code. I would like to modify the directory path while creating the file.<br>example when we give mkdir newfile; // this newfile should be present in /newlabel/newfile<br>
// newlabel is prefixed before the newfile<br><br><br>So i am trying to modify the functions defined in the struct inode_operations for the directory.<br><br>static const struct inode_operations ramfs_dir_inode_operations = {<br>
.create = ramfs_create, <br> .lookup = simple_lookup,<br> .link = simple_link,<br> .unlink = simple_unlink,<br> .symlink = ramfs_symlink,<br> .mkdir = ramfs_mkdir,<br> .rmdir = simple_rmdir,<br>
.mknod = ramfs_mknod, //Modifying this function to add the prefix to the file<br> .rename = simple_rename,<br>};<br><br>Let me know if I am doing something wrong<br><br>Thanks<br>Dinesh<br><br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<font color="#888888"><br>
<br>
--<br>
Thanks -<br>
Manish<br>
==================================<br>
[$\*.^ -- I miss being one of them<br>
==================================<br>
</font></blockquote></div><br>