}
void
-dofile(char *path, Dir *f, int pathonly, long depth)
+dofile(char *path, Dir *f, int pathonly)
{
char *p;
- USED(depth);
-
if(
(f == dotdir)
|| (tflag && ! (f->qid.type & QTTMP))
case 'q': Bprint(bout, "%ullx.%uld.%.2uhhx", f->qid.path, f->qid.vers, f->qid.type); break;
case 's': Bprint(bout, "%lld", f->length); break;
case 'x': Bprint(bout, "%ulo", f->mode); break;
+
+ /* These two are slightly different, as they tell us about the fileserver instead of the file */
+ case 'D': Bprint(bout, "%ud", f->dev); break;
+ case 'T': Bprint(bout, "%C", f->type); break;
default:
abort();
}
continue;
if(! (f->qid.type & QTDIR)){
if(fflag && depth >= mindepth)
- dofile(path, f, 0, depth);
+ dofile(path, f, 0);
} else if(strcmp(f->name, ".") == 0 || strcmp(f->name, "..") == 0){
warn(". or .. named file: %s/%s", path, f->name);
} else{
if(depth+1 > maxdepth){
- dofile(path, f, 0, depth);
+ dofile(path, f, 0);
continue;
} else if(path == dotpath){
if((file = s_new()) == nil)
nodescend:
depth--;
if(dflag && depth >= mindepth)
- dofile(path, cf, 0, depth);
+ dofile(path, cf, 0);
}
char*
if((stfmt = s_reset(stfmt)) == nil)
sysfatal("s_reset: %r");
s_append(stfmt, EARGF(usage()));
- i = strspn(s_to_c(stfmt), "UGMamnpqsx");
+ i = strspn(s_to_c(stfmt), "UGMamnpqsxDT");
if(i != s_len(stfmt))
- sysfatal("bad stfmt: %s\n", s_to_c(stfmt));
+ sysfatal("bad stfmt: %s", s_to_c(stfmt));
break;
default:
usage();
}
if((d = dirstat(argv[i])) != nil && ! (d->qid.type & QTDIR)){
if(fflag && !seen(d) && mindepth < 1)
- dofile(argv[i], d, 1, 0);
+ dofile(argv[i], d, 1);
} else
walk(argv[i], d, 1);
free(d);