linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jamie Lokier <jamie@shareable.org>
To: Oleg Drokin <green@linuxhacker.ru>
Cc: linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH 1/3] VFS "stat light" out of fstatat, and fine grained flags
Date: Sun, 12 Apr 2009 21:50:48 +0100	[thread overview]
Message-ID: <20090412205048.GI4394@shareable.org> (raw)
In-Reply-To: <20090407231524.GA1569655@fiona.linuxhacker.ru>

Oleg Drokin wrote:
>    Also it adds AT_STAT_SELF flag to mean that the stat should be executed not
>    on a path, but on the passed filedecriptor itself.

Do you think this is more attractive?

    ret = fstatat(fd, 0, &stat, AT_STAT_SELF|AT_STAT_TYPE|AT_STAT_SIZE);

Or this?

    ret = fstatat(fd, 0, &stat, AT_STAT_TYPE|AT_STAT_SIZE);

Where 0 in the path automatically means AT_STAT_SELF.

Or this?

    ret = fstatat(fd, AT_STAT_SELF, &stat, AT_STAT_TYPE|AT_STAT_SIZE);

Where AT_STAT_SELF is defined as (const char *)-1 in system headers,
to better catch null pointer application bugs.

-- Jamie

  parent reply	other threads:[~2009-04-12 20:50 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-07 23:15 [PATCH 1/3] VFS "stat light" out of fstatat, and fine grained flags Oleg Drokin
2009-04-07 23:25 ` Jeff Garzik
2009-04-08  6:56   ` forwarding -fsdevel to -kernel (was Re: [PATCH 1/3] VFS "stat ...) flags Miklos Szeredi
2009-04-08  7:35     ` David Miller
2009-04-12 20:50 ` Jamie Lokier [this message]
2009-04-12 21:46   ` [PATCH 1/3] VFS "stat light" out of fstatat, and fine grained flags Oleg Drokin
2009-04-21 10:20     ` VFS "stat light" fstatat, inconsistent *at() function interfaces Jamie Lokier

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=20090412205048.GI4394@shareable.org \
    --to=jamie@shareable.org \
    --cc=green@linuxhacker.ru \
    --cc=linux-fsdevel@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).