All Forums |
Register |
Login |
Search |
Subscriptions |
My Profile |
Inbox |
Tool Warehouse |
FAQs |
Resources |
Help |
Member List |
Address Book |
Logout |
|
|
RE: operation of "ls" inconsistant
|
Logged in as: Guest |
Users viewing this topic: none |
|
Login  |
|
|
RE: operation of "ls" inconsistant - May 27, '04, 5:05:33 PM
|
|
|
benker
Posts: 37
Joined: May 7, '04,
Status: offline
|
Is there something that can be fixed in "ls" now that you have this information?
|
|
|
RE: operation of "ls" inconsistant - May 27, '04, 5:32:41 PM
|
|
|
Rodney
Posts: 3728
Joined: Jul. 9, '02,
From: /Tools lab
Status: offline
|
mmm, well I'll fix the o/p of stat for the unsigned longs :-)
> Is there something that can be fixed in "ls" now that you have this information?
maybe, maybe not. The "correct" sol'n is the subsystem fix to identify the FS as unreliable
(instead of reliable as is getting reported now).
We'd have to re-port ls at /Tools to make any changes. That's not on this week's plan ;-)
|
|
|
RE: operation of "ls" inconsistant - May 27, '04, 11:19:32 PM
|
|
|
markfunk
Posts: 673
Joined: Mar. 31, '03,
Status: offline
|
The problem has nothing to do with stat(). The problem is probably in the fts() routines which do filesystem loop checking and/or consistency checking. As it opens directories/files, it keeps track of the inode #'s. If it thinks the same file/dir has changed its inode #, then this is an inconsistency and it probably bails.
We were modifying the library code that did this sort of checking to use the Interix S_INO_RELIABLE flag to determine if this sort of check in the software was appropriate on Windows.
Without this support, then there is a possiblity that the fts() code could be hacked to keep the directory open for the duration of the operations. Unclear until we look at the fts() code.
As Rodney says - we'd have to port the ls and the fts() source code ourselves. We know there are changes required to both that are Interix specific. (eg it's not a trivial port)
|
|
|
RE: operation of "ls" inconsistant - Jul. 14, '04, 2:42:16 AM
|
|
|
Rodney
Posts: 3728
Joined: Jul. 9, '02,
From: /Tools lab
Status: offline
|
meanwhile... several months later... we return to this thread.
In a related note ls has been ported at /Tools to provide colour
support for file types (like '-F' option but in colour instead of with
trailing symbols). In doing this I've been working with the ls code
of course. The confirmation is that the problem is in the FTS code not
getting (as Mark pointed out earlier) the same inode with the fstat()
as the lstat(). The FTS code balks at this so the directory ("." in
this case) doesn't get added to the list which results in an empty list
returned from FTS.
The long and short of it is I've added an option to ls that will
add another FTS option (FTS_NOCHDIR) when '-U' is specified. This is just
in my private sandbox right now. It seems to work okay for me. But I'm
wondering if you would be interested in giving it a try. If it works for
you then I can release it as a workaround.
|
|
|
RE: operation of "ls" inconsistant - Jul. 21, '04, 10:12:36 AM
|
|
|
benker
Posts: 37
Joined: May 7, '04,
Status: offline
|
Rodney, I've just discovered that "find" seems to be afflicted with the same problem.
Just an FYI.
|
|
|
RE: operation of "ls" inconsistant - Jul. 21, '04, 10:36:28 AM
|
|
|
Rodney
Posts: 3728
Joined: Jul. 9, '02,
From: /Tools lab
Status: offline
|
> find" seems to be afflicted with the same problem.
Sounds right. Anything that links with the FTS functions will behave the
same -- in this case I assume the WinDFS.
|
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
|
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts |
|
|
|