linux-c-programming.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Vineet Joglekar" <vintya@excite.com>
To: linux-c-programming@vger.kernel.org
Subject: Can I allocate few bytes in a file to store info about that file; not visible to user?
Date: Mon, 26 Apr 2004 10:32:41 -0400 (EDT)	[thread overview]
Message-ID: <20040426143241.376E2197372@xprdmailfe3.nwk.excite.com> (raw)


Hi all,

In ext2fs, while creating a file, can I allocate a number of bytes for that file in advance, such that those bytes are not seen by the user? that is,

suppose I am creating a new file temp, then allocate 50 bytes immediately after creating the file. I want to use those bytes to store the file related info; accessible only to kernel. Whatever data user wants to add, will be added after the these 50 bytes. If user does lseek(fd,0,SEEK_SET), then the file pointer should point to the 51st byte. The 1st 50 bytes shouldnt be visible to user. I dont care if the file size is shown as userdata+50. Is it possible to achieve? If yes, how?

Thanks and regards,

Vineet

_______________________________________________
Join Excite! - http://www.excite.com
The most personalized portal on the Web!

             reply	other threads:[~2004-04-26 14:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-26 14:32 Vineet Joglekar [this message]
2004-04-26 17:05 ` Can I allocate few bytes in a file to store info about that file; not visible to user? Glynn Clements
  -- strict thread matches above, loose matches on Subject: below --
2004-04-28 18:15 Vineet Joglekar
2004-04-29  3:58 ` Vadiraj C S

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=20040426143241.376E2197372@xprdmailfe3.nwk.excite.com \
    --to=vintya@excite.com \
    --cc=linux-c-programming@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 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).