From: JanuGerman <doublemalam@yahoo.co.uk>
To: linuxkernel <linux-kernel@vger.kernel.org>
Subject: Two questions regarding Opening files within Kernel!
Date: Sat, 7 Apr 2007 06:58:51 +0000 (GMT) [thread overview]
Message-ID: <400855.99642.qm@web86903.mail.ukl.yahoo.com> (raw)
Hi Every one,
I have got two questions regarding opening files within the Linux kernel. If some body can help me, in sorting out this problem, i will be very thankful.
1) I have just a file path with me, an absolute path, but no dentry, no inode, no vfsmount object, which function i can call to get a "file" object associated with the absoulte file path. I have surfed arround the source code especially fs/open.c and some other files, but each function requires a parameter "mode" and "fd" beside file path. Actually, i was confuse about the "mode" parameter (and its differece with "flag"), like what to send, and secondly for "fd", i am not sure, what value to send as there is no file infact and only file path exists. Any idea?
2) Any functionality within linux kernel source code, to read one line per file? or some indirect way to set buffer size for one read?. That is, any existing header file for doing text I/O rather than binary within the kernel source code?
Thanks,
JG
___________________________________________________________
The all-new Yahoo! Mail goes wherever you go - free your email address from your Internet provider. http://uk.docs.yahoo.com/nowyoucan.html
next reply other threads:[~2007-04-07 7:05 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-07 6:58 JanuGerman [this message]
2007-04-07 9:22 ` Two questions regarding Opening files within Kernel! Roland Kuhn
2007-04-07 11:07 ` Jan Engelhardt
[not found] <fa.9BBqigWhVcsOIUStQ9CipWD6PQo@ifi.uio.no>
2007-04-07 16:50 ` Robert Hancock
-- strict thread matches above, loose matches on Subject: below --
2007-04-07 16:57 JanuGerman
2007-04-07 18:44 ` Jan Engelhardt
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=400855.99642.qm@web86903.mail.ukl.yahoo.com \
--to=doublemalam@yahoo.co.uk \
--cc=linux-kernel@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.