• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/src/router/busybox-1.x/coreutils/

Lines Matching defs:dn

235 static int count_dirs(struct dnode **dn, int nfiles, int notsubdirs)
239 if (!dn)
244 if (!S_ISDIR(dn[i]->dstat.st_mode))
246 name = dn[i]->name;
299 static struct dnode **splitdnarray(struct dnode **dn, int nfiles, int which)
304 if (dn == NULL || nfiles < 1)
309 dncnt = countsubdirs(dn, nfiles);
311 dncnt = countdirs(dn, nfiles); /* assume we are looking for dirs */
321 if (S_ISDIR(dn[i]->dstat.st_mode)) {
325 name = dn[i]->name;
329 dnp[d++] = dn[i];
332 dnp[d++] = dn[i];
375 static void dnsort(struct dnode **dn, int size)
377 qsort(dn, size, sizeof(*dn), sortcmp);
380 #define dnsort(dn, size) ((void)0)
384 static void showfiles(struct dnode **dn, int nfiles)
391 if (dn == NULL || nfiles < 1)
399 int len = strlen(dn[i]->name);
432 column += list_single(dn[i]);
441 static void showdirs(struct dnode **dn, int ndirs, int first)
448 if (dn == NULL || ndirs < 1)
456 printf("%s:\n", dn[i]->fullname);
458 subdnp = list_dir(dn[i]->fullname);
486 struct dnode *dn, *cur, **dnp;
494 dn = NULL;
521 cur->next = dn;
522 dn = cur;
530 if (dn == NULL)
533 for (i = 0, cur = dn; i < nfiles; i++) {
548 static int list_single(struct dnode *dn)
561 if (dn->fullname == NULL)
565 ttime = dn->dstat.st_mtime; /* the default time */
567 ttime = dn->dstat.st_atime;
569 ttime = dn->dstat.st_ctime;
573 append = append_char(dn->dstat.st_mode);
579 column += printf("%7ld ", (long) dn->dstat.st_ino);
582 column += printf("%4"OFF_FMT"d ", (off_t) dn->dstat.st_blocks >> 1);
585 column += printf("%-10s ", (char *) bb_mode_string(dn->dstat.st_mode));
588 column += printf("%4ld ", (long) dn->dstat.st_nlink);
593 get_cached_username(dn->dstat.st_uid),
594 get_cached_groupname(dn->dstat.st_gid));
599 column += printf("%-8d %-8d", dn->dstat.st_uid, dn->dstat.st_gid);
603 if (S_ISBLK(dn->dstat.st_mode) || S_ISCHR(dn->dstat.st_mode)) {
604 column += printf("%4d, %3d ", (int) major(dn->dstat.st_rdev),
605 (int) minor(dn->dstat.st_rdev));
609 make_human_readable_str(dn->dstat.st_size, 1, 0));
611 column += printf("%9"OFF_FMT"d ", (off_t) dn->dstat.st_size);
641 if (dn->sid) {
643 len = strlen(dn->sid) + 1;
644 safe_strncpy(context, dn->sid, len);
645 freecon(dn->sid);
657 if (show_color && !lstat(dn->fullname, &info)) {
662 column += printf("%s", dn->name);
668 if (S_ISLNK(dn->dstat.st_mode)) {
669 char *lpath = xmalloc_readlink_or_warn(dn->fullname);
673 if (!stat(dn->fullname, &info)) {
792 struct dnode *dn;
914 dn = NULL;
921 cur->next = dn;
922 dn = cur;
930 for (i = 0, cur = dn; i < nfiles; i++) {