PERFORCE change 21034 for review
Brian Feldman
green at freebsd.org
Wed Nov 13 16:38:44 GMT 2002
http://perforce.freebsd.org/chv.cgi?CH=21034
Change 21034 by green at green_laptop_2 on 2002/11/13 08:38:20
Okay, I really hate this code, fts(3), etc. I'm SURE it works
now. Net changes are a single extra comparison and correct
printing of pathname in errors.
Affected files ...
.. //depot/projects/trustedbsd/mac/bin/ls/ls.c#22 edit
Differences ...
==== //depot/projects/trustedbsd/mac/bin/ls/ls.c#22 (text+ko) ====
@@ -448,7 +448,8 @@
* If not recursing down this tree and don't need stat info, just get
* the names.
*/
- ch_options = !f_recursive && options & FTS_NOSTAT ? FTS_NAMEONLY : 0;
+ ch_options = !f_recursive && !f_label &&
+ options & FTS_NOSTAT ? FTS_NAMEONLY : 0;
while ((p = fts_read(ftsp)) != NULL)
switch (p->fts_info) {
@@ -697,9 +698,9 @@
goto label_out;
}
- if (cur->fts_parent == NULL)
+ if (cur->fts_level == FTS_ROOTLEVEL)
snprintf(name, sizeof(name),
- "%s", p->fts_name);
+ "%s", cur->fts_name);
else
snprintf(name, sizeof(name),
"%s/%s", cur->fts_parent->
To Unsubscribe: send mail to majordomo at trustedbsd.org
with "unsubscribe trustedbsd-cvs" in the body of the message
More information about the trustedbsd-cvs
mailing list