Bug 76735
Summary: | [ls] Bad errormessages on broken symlinks | ||
---|---|---|---|
Product: | [Retired] Red Hat Raw Hide | Reporter: | Enrico Scholz <rh-bugzilla> |
Component: | fileutils | Assignee: | Tim Waugh <twaugh> |
Status: | CLOSED RAWHIDE | QA Contact: | Mike McLean <mikem> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 1.0 | ||
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | i386 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2002-11-07 17:15:38 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Enrico Scholz
2002-10-25 16:46:54 UTC
I don't see this. Can you see what 'strace' says is going wrong? strace tells: ---- ... open(".", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = 3 fstat64(3, {st_mode=S_IFDIR|0775, st_size=0, ...}) = 0 fcntl64(3, F_SETFD, FD_CLOEXEC) = 0 brk(0x805f000) = 0x805f000 getdents64(0x3, 0x805dc70, 0x1000, 0x805dc40) = 72 lstat64("bar", {st_mode=S_IFLNK|0777, st_size=3, ...}) = 0 readlink("bar", "foo", 128) = 3 stat64("foo", 0xbffff460) = -1 ENOENT (No such file or directory) getdents64(0x3, 0x805dc70, 0x1000, 0x805dc40) = 0 close(3) = 0 write(1, "\33[00m", 5) = 5 write(2, "ls: ", 4ls: ) = 4 write(2, ".", 1.) = 1 write(2, ": No such file or directory", 27: No such file or directory) = 27 write(2, "\n", 1 ---- Fix is | type = next->d_type; | #endif | total_blocks += gobble_file (next->d_name, type, 0, name); |+ errno = 0; | } | | close_error = CLOSEDIR (reading); in src/ls.c:2110 Alternatively, you can do the more obviously | clear_files (); | |- errno = 0; |- while ((next = readdir (reading)) != NULL) |+ while ((next = (errno=0, readdir (reading))) != NULL) | if (file_interesting (next)) | { | enum filetype type = unknown; This will fix bug #76738 too Fixed package is 4.1.9-13, which will show up in rawhide shortly. |