All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrea Arcangeli <andrea@suse.de>
To: Andries.Brouwer@cwi.nl
Cc: linux-kernel@vger.kernel.org, viro@math.psu.edu
Subject: Re: `rmdir .` doesn't work in 2.4
Date: Tue, 9 Jan 2001 00:22:36 +0100	[thread overview]
Message-ID: <20010109002236.K27646@athlon.random> (raw)
In-Reply-To: <UTC200101082250.XAA147777.aeb@texel.cwi.nl>
In-Reply-To: <UTC200101082250.XAA147777.aeb@texel.cwi.nl>; from Andries.Brouwer@cwi.nl on Mon, Jan 08, 2001 at 11:50:44PM +0100

On Mon, Jan 08, 2001 at 11:50:44PM +0100, Andries.Brouwer@cwi.nl wrote:
>     From: Andrea Arcangeli <andrea@suse.de>
> 
>     > But in fact it fails with EINVAL, and
>     > 
>     > [EINVAL]: The path argument contains a last component that is dot.
> 
>     I can't confirm. The specs I'm checking are here:
> 
>         http://www.opengroup.org/onlinepubs/007908799/xsh/rmdir.html
> 
> That is the SUSv2 text, one of the ingredients for the new
> POSIX standard. I quoted the current Austin draft, the current
> draft for the next version of the POSIX standard.
> 
> Quoting a text fragment:
> 
>         The rmdir( ) function shall remove a directory whose name is given by
>         path. The directory is removed only if it is an empty directory.
>         If the directory is the root directory or the current working
>         directory of any process, it is unspecified whether the function
>         succeeds, or whether it shall fail and set errno to [EBUSY].
>         If path names a symbolic link, then rmdir( ) shall fail and
>         set errno to [ENOTDIR]. If the path argument refers to a path
>         whose final component is either dot or dot-dot, rmdir( ) shall
>         fail. ...

I trust your specs said so, however I'm not sure which are the specs
we should follow for Linux.

At least for LFS 2.2.x fixage I always followed the SuSv2 specs and they
doesn't even say that rmdir can return -EINVAL. So returning -EINVAL is wrong
in first place according to SuSv2.

> from the directory "foo", but rmdir("foo/.") does not finish
> by removing the name "." from the directory "foo".

Sure. Also `rmdir .` doesn't mean remove "." from current directory but it
means "remove the directory pointed out by path `.'". The kernel/We definitely
knows which is such directory. That is in sync with the specs: "The rmdir()
function removes a directory whose name is given by path". You agree that the
path "." identifys one directory.

Andrea
-
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-08 23:22 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-01-08 22:50 `rmdir .` doesn't work in 2.4 Andries.Brouwer
2001-01-08 23:22 ` Andrea Arcangeli [this message]
2001-01-09 17:02 ` Kurt Roeckx
  -- strict thread matches above, loose matches on Subject: below --
2001-01-09 14:38 Jesse Pollard
2001-01-09 13:41 Jesse Pollard
2001-01-09 14:06 ` Andrea Arcangeli
2001-01-10 14:47   ` Stephen C. Tweedie
2001-01-10 15:03     ` Andrea Arcangeli
2001-01-10 17:28       ` Alexander Viro
2001-01-10 17:38         ` Andrea Arcangeli
2001-01-09 14:23 ` Alexander Viro
2001-01-09 12:18 Andries.Brouwer
2001-01-08 20:56 Andries.Brouwer
2001-01-08 21:34 ` Andrea Arcangeli
2001-01-10 22:25   ` Matthias Andree
2001-01-08 17:08 Andrea Arcangeli
2001-01-08 17:31 ` Mohammad A. Haque
2001-01-08 17:55   ` Andrea Arcangeli
2001-01-08 18:04     ` Alexander Viro
2001-01-08 20:30       ` Andrea Arcangeli
2001-01-08 21:08         ` Alexander Viro
2001-01-08 21:56           ` Andrea Arcangeli
2001-01-08 23:28             ` Linus Torvalds
2001-01-09  8:09               ` Stefan Traby
2001-01-09 10:48                 ` Eric Lammerts
2001-01-09  9:31           ` Albert D. Cahalan
2001-01-09 15:00             ` Alexander Viro
2001-01-09 20:59               ` Albert D. Cahalan
2001-01-09 21:42                 ` Alexander Viro
2001-01-08 23:27         ` Linus Torvalds
2001-01-09  0:01           ` Andrea Arcangeli
2001-01-09 13:50             ` Stephen C. Tweedie
2001-01-08 17:58 ` Alexander Viro
2001-01-08 20:28   ` Andrea Arcangeli
2001-01-09 13:52     ` Stephen C. Tweedie
2001-01-08 21:54   ` Stefan Traby
2001-01-08 22:11     ` Benson Chow
2001-01-08 22:37       ` Andrea Arcangeli
2001-01-09  1:37       ` Wakko Warner
2001-01-09  1:55         ` Andrea Arcangeli
2001-01-09  4:56           ` Marc Lehmann
2001-01-11 18:57       ` Bernhard Rosenkraenzer
2001-01-09 13:39     ` Alexander Viro
2001-01-12 18:27   ` Pavel Machek

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=20010109002236.K27646@athlon.random \
    --to=andrea@suse.de \
    --cc=Andries.Brouwer@cwi.nl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@math.psu.edu \
    /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.