bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug #27923] rm -f gives an error when trying to delete a non-existe


From: Eric Blake
Subject: Re: [bug #27923] rm -f gives an error when trying to delete a non-existent file on a read-only filesystem
Date: Tue, 03 Nov 2009 05:59:04 -0700
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.23) Gecko/20090812 Thunderbird/2.0.0.23 Mnenhy/0.7.6.666

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Jim Meyering on 11/3/2009 4:04 AM:
> +  if (errno == EROFS)
> +    {
> +      struct stat st;
> +      if ( ! (fstatat (fts->fts_cwd_fd, ent->fts_accpath, &st,
> +                       AT_SYMLINK_NOFOLLOW) && errno == ENOENT))

Why not use lstatat, rather than fstatat(,AT_SYMLINK_NOFOLLOW)?

- --
Don't work too hard, make some time for fun as well!

Eric Blake             address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkrwKRcACgkQ84KuGfSFAYCyCACfcO+1LhRbfVFWPkAMAN05Xo9E
kbwAn1Ck3ShDKV9SB/svSDK7j52fsFXP
=vzWQ
-----END PGP SIGNATURE-----




reply via email to

[Prev in Thread] Current Thread [Next in Thread]