From: pdineshb@gmail.com (dinesh bhaskar)
To: kernelnewbies@lists.kernelnewbies.org
Subject: Modifying the filesystem code
Date: Thu, 30 Dec 2010 00:52:28 -0500 [thread overview]
Message-ID: <AANLkTikvdTKfsLMH9cmynh3aATzeKNm_2ubFZz9RLWLn@mail.gmail.com> (raw)
Hello all,
I am working on ramfs filesystem code. I would like to modify the directory
path while creating the file.
example when we give mkdir newfile; // this newfile should be present in
/newlabel/newfile
// Assuming ramfs is mounted at /, newlabel is
prefixed before the newfile
So i am trying to modify the functions defined in the struct
inode_operations for the directory.
static const struct inode_operations ramfs_dir_inode_operations = {
.create = ramfs_create,
.lookup = simple_lookup,
.link = simple_link,
.unlink = simple_unlink,
.symlink = ramfs_symlink,
.mkdir = ramfs_mkdir,
.rmdir = simple_rmdir,
.mknod = ramfs_mknod, //Modifying this function to add the prefix
to the file
.rename = simple_rename,
};
is it possible?
Let me know if I am doing something wrong.
Thanks
Dinesh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20101230/24318746/attachment.html
next reply other threads:[~2010-12-30 5:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-30 5:52 dinesh bhaskar [this message]
2010-12-30 6:41 ` Modifying the filesystem code Rajat Sharma
-- strict thread matches above, loose matches on Subject: below --
2010-12-29 20:21 dinesh bhaskar
2010-12-29 20:36 ` Manish Katiyar
2010-12-29 21:13 ` dinesh bhaskar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=AANLkTikvdTKfsLMH9cmynh3aATzeKNm_2ubFZz9RLWLn@mail.gmail.com \
--to=pdineshb@gmail.com \
--cc=kernelnewbies@lists.kernelnewbies.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).