public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Padraig Brady <Padraig@AnteFacto.com>
To: dmeyer@dmeyer.net
Cc: linux-kernel@vger.kernel.org
Subject: Re: Documenting stat(2)
Date: Thu, 18 Jan 2001 11:53:32 +0000	[thread overview]
Message-ID: <3A66D93C.8090500@AnteFacto.com> (raw)
In-Reply-To: <20010118020528.A16871@jhereg.dmeyer.net>

dmeyer@dmeyer.net wrote:

> In article <9463fj$gsq$1@penguin.transmeta.com> you write:
> 
>> Basically, the _only_ think you should depend on is that st_size
>> contains:
>>  - for regular files, the size of the file in bytes
>>  - for symlinks, the length of the symlink.
> 
> I don't think this is right - for a symlink, stat should return the
> size of the file; lstat should return the size of the symlink.

Nope stat should return the details of the symlink
whereas lstat should return the details of the symlink target.

But there is another ambiguity when stating symlinks.
In the current implementation the length of the symlink (name)
is the same as the symlink file size. Will this always
be the case? If not then the above statement is wrong.
i.e.

 >> - for symlinks, the length of the symlink.

should be

 >> - for symlinks, the symlink file size in bytes (currently the
 >>   length of the symlink).

Padraig.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

  reply	other threads:[~2001-01-18 11:53 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-01-18  7:05 Documenting stat(2) dmeyer
2001-01-18 11:53 ` Padraig Brady [this message]
2001-01-18 15:54   ` dmeyer
2001-01-18 20:52   ` Igmar Palsenberg
2001-01-19  1:00     ` Mike Castle
2001-01-20 19:39       ` Igmar Palsenberg
2001-01-19 10:18   ` Andreas Schwab
  -- strict thread matches above, loose matches on Subject: below --
2001-01-18  5:28 Eric S. Raymond
2001-01-18  6:46 ` Linus Torvalds
2001-01-18 12:56 ` Felix von Leitner

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=3A66D93C.8090500@AnteFacto.com \
    --to=padraig@antefacto.com \
    --cc=dmeyer@dmeyer.net \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox