[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #54913] find: "-type"-test wrong on bind-mounted char device
From: |
Bernhard Voelker |
Subject: |
[bug #54913] find: "-type"-test wrong on bind-mounted char device |
Date: |
Thu, 1 Nov 2018 12:49:47 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:62.0) Gecko/20100101 Firefox/62.0 |
Follow-up Comment #3, bug #54913 (project findutils):
yes, getdents returns d_type=DT_REG, while the later newfstatat - needed for
the -ls action - returns st_mode=S_IFCHR:
getdents(4, [
{d_ino=319425, d_off=1, d_reclen=24, d_name=".", d_type=DT_DIR},
{d_ino=13363, d_off=2, d_reclen=24, d_name="..", d_type=DT_DIR},
{d_ino=322564, d_off=3, d_reclen=40, d_name="bindmntoverfile",
d_type=DT_REG},
{d_ino=319462, d_off=4, d_reclen=24, d_name="null", d_type=DT_CHR}], 32768)
= 112
...
newfstatat(5, "bindmntoverfile", {
st_dev=makedev(0, 21),
st_ino=319462,
st_mode=S_IFCHR|0644,
st_nlink=1,
st_uid=0,
st_gid=0,
st_blksize=4096,
st_blocks=0,
st_rdev=makedev(1, 3),
st_atime=1540884672 /* 2018-10-30T08:31:12.131190660+0100 */,
st_atime_nsec=131190660,
st_mtime=1540884672 /* 2018-10-30T08:31:12.131190660+0100 */,
st_mtime_nsec=131190660,
st_ctime=1540884672 /* 2018-10-30T08:31:12.131190660+0100 */,
st_ctime_nsec=131190660},
AT_SYMLINK_NOFOLLOW) = 0
At least this is not an FTS regression, as 'oldfind' suffered from the same
issue.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?54913>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [bug #54913] find: "-type"-test wrong on bind-mounted char device,
Bernhard Voelker <=