3 ms·
As a side note: if(b->qid.path==a->qid.path) is interesting. This is not how you compare strings in C. So it is either a bug or dirstat() needs to guaran
by mixedbit 13y ago
As a side note:
if(b->qid.path==a->qid.path)
is interesting. This is not how you compare strings in C. So it is either a bug or dirstat() needs to guarantee that different results pointing to the same file always share the path string.
- jedbrown 13y agoThis line is comparing integers, not strings. Qid is a structure containing path and vers fields: path is guaranteed to be unique among all path names cur- rently on the file server, and vers changes each time the file is modified. The path is a long long (64 bits, vlong) and the vers is an unsigned long (32 bits, ulong). Thus, if two files have the same type, dev, and qid they are the same file. http://man.cat-v.org/plan_9/2/stat http://man.cat-v.org/plan_9/2/stat
- deleted 13y ago[deleted]