Home | History | Annotate | Download | only in toolbox

Lines Matching refs:flags

17 // bits for flags argument
25 static int listpath(const char *name, int flags);
89 static int show_total_size(const char *dirname, DIR *d, int flags)
100 if (de->d_name[0] == '.' && (flags & LIST_ALL) == 0)
122 static int listfile_size(const char *path, const char *filename, int flags)
136 static int listfile_long(const char *path, int flags)
207 static int listfile(const char *dirname, const char *filename, int flags)
209 if ((flags & (LIST_LONG | LIST_SIZE)) == 0) {
224 if ((flags & LIST_LONG) != 0) {
225 return listfile_long(pathname, flags);
226 } else /*((flags & LIST_SIZE) != 0)*/ {
227 return listfile_size(pathname, filename, flags);
231 static int listdir(const char *name, int flags)
243 if ((flags & LIST_SIZE) != 0) {
244 show_total_size(name, d, flags);
249 if(de->d_name[0] == '.' && (flags & LIST_ALL) == 0) continue;
251 listfile(name, de->d_name, flags);
254 if (flags & LIST_RECURSIVE) {
263 if (de->d_name[0] == '.' && (flags & LIST_ALL) == 0)
288 listdir(tmp, flags);
297 static int listpath(const char *name, int flags)
316 if ((flags & LIST_DIRECTORIES) == 0 && S_ISDIR(s.st_mode)) {
317 if (flags & LIST_RECURSIVE)
319 return listdir(name, flags);
322 return listfile(NULL, name, flags);
328 int flags = 0;
337 flags |= LIST_LONG;
339 flags |= LIST_SIZE;
341 flags |= LIST_ALL;
343 flags |= LIST_RECURSIVE;
345 flags |= LIST_DIRECTORIES;
348 if(listpath(argv[i], flags) != 0) {
358 return listpath(".", flags);