<br>Hello all,<br><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
<div> // Assuming ramfs is mounted at /, newlabel is prefixed before the newfile<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>is it possible?<br><br>Let me know if I am doing something wrong.<br><br><br>Thanks <br>
Dinesh</div>