kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: ymdatta <ymdatta.work@gmail.com>
Cc: kernelnewbies@kernelnewbies.org
Subject: Re: Accessing allocated space in a debugfs file
Date: Fri, 2 Oct 2020 13:35:11 +0200	[thread overview]
Message-ID: <20201002113511.GA3292884@kroah.com> (raw)
In-Reply-To: <1e7b7d6d-0764-01fc-e527-f2e703e45ca2@gmail.com>

On Fri, Oct 02, 2020 at 04:59:24PM +0530, ymdatta wrote:
> On 30/09/20 11:19 pm, Greg KH wrote:
> > On Wed, Sep 30, 2020 at 10:32:05PM +0530, ymdatta wrote:
> 
> >>
> >> I want to write in this file, how should i be accessing the space created
> >> from previous function call.
> > 
> > That's not what "size" means here.  "size" just sets the value that you
> > see if you look at the directory for that debugfs file (or stat() it).
> > 
> 
> Didn't realize this. Why do we need this then? What does this 'size' help
> in achieving (or) where is this used?

People like to have pretty values visable in userspace for looking at
files before opening them :)

Right now there are only a handful of users of that "option", compared
with the thousands of "normal" debugfs files.  Look at the callers of
that function for why it might make sense for that option being used
here.

good luck!

greg k-h

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

      reply	other threads:[~2020-10-02 11:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-30 17:02 Accessing allocated space in a debugfs file ymdatta
2020-09-30 17:49 ` Greg KH
2020-10-02 11:29   ` ymdatta
2020-10-02 11:35     ` Greg KH [this message]

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=20201002113511.GA3292884@kroah.com \
    --to=greg@kroah.com \
    --cc=kernelnewbies@kernelnewbies.org \
    --cc=ymdatta.work@gmail.com \
    /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).