Lines Matching refs:node
48 struct dirtree *node;
53 static void print(long long size, struct dirtree *node)
70 if (node) name = dirtree_path(node, NULL);
72 if (node) free(name);
106 // dirtree callback, compute/display size of node
107 static int do_du(struct dirtree *node)
111 if (!node->parent) TT.st_dev = node->st.st_dev;
112 else if (!dirtree_notdotdot(node)) return 0;
115 if ((toys.optflags & FLAG_x) && (TT.st_dev != node->st.st_dev))
120 struct dirtree *try = node;
123 if (node->st.st_dev==try->st.st_dev && node->st.st_ino==try->st.st_ino)
128 if (!(toys.optflags & FLAG_l) && !node->again)
129 if (seen_inode(&TT.inodes, &node->st)) return 0;
132 if (S_ISDIR(node->st.st_mode)) {
133 if (!node->again) {
141 blocks = node->st.st_blocks + (unsigned long)node->extra;
142 node->extra = blocks;
143 if (node->parent)
144 node->parent->extra = (unsigned long)node->parent->extra+blocks;
145 else TT.total += node->extra;
147 if ((toys.optflags & FLAG_a) || !node->parent
148 || (S_ISDIR(node->st.st_mode) && !(toys.optflags & FLAG_s)))
150 blocks = node->extra;
151 print(blocks*512LL, node);