Home
last modified time | relevance | path

Searched refs:d_name (Results 1 – 25 of 496) sorted by relevance

12345678910>>...20

/freebsd/usr.bin/diff/
H A Ddiffdir.c111 while (dp1 != edp1 && strcmp((*dp1)->d_name, start) < 0) in diffdir()
125 ignore_file_case ? strcasecmp(dent1->d_name, dent2->d_name) : in diffdir()
126 strcmp(dent1->d_name, dent2->d_name) ; in diffdir()
138 print_only(path1, dirlen1, dent1->d_name); in diffdir()
148 print_only(path2, dirlen2, dent2->d_name); in diffdir()
176 strlcpy(path1 + plen1, dp->d_name, PATH_MAX - plen1); in diffit()
182 if (ignore_file_case && strcasecmp(dp2->d_name, dp2->d_name) == 0) in diffit()
183 strlcpy(path2 + plen2, dp2->d_name, PATH_MAX - plen2); in diffit()
185 strlcpy(path2 + plen2, dp->d_name, PATH_MAX - plen2); in diffit()
296 if (dp->d_name[0] == '.' && (dp->d_name[1] == '\0' || in selectfile()
[all …]
/freebsd/stand/kboot/kboot/
H A Dkbootfdt.c53 sprintf(subpath, "%s/%s", path, dent->d_name); in add_node_to_fdt()
54 if (strcmp(dent->d_name, ".") == 0 || in add_node_to_fdt()
55 strcmp(dent->d_name, "..") == 0) in add_node_to_fdt()
60 dent->d_name); in add_node_to_fdt()
63 child_offset, path, dent->d_name); in add_node_to_fdt()
75 error = fdt_setprop(buffer, fdt_offset, dent->d_name, in add_node_to_fdt()
80 "node %d\n", error, dent->d_name, in add_node_to_fdt()
/freebsd/sys/sys/
H A Ddirent.h73 char d_name[MAXNAMLEN + 1]; /* name must be no longer than this */ member
75 char d_name[255 + 1]; /* name must be no longer than this */ member
85 char d_name[255 + 1]; /* name must be no longer than this */ member
120 ((__offsetof(struct dirent, d_name) + (namlen) + 1 + 7) & ~7)
139 memset(dp->d_name + dp->d_namlen, 0, in dirent_terminate()
140 dp->d_reclen - (__offsetof(struct dirent, d_name) + dp->d_namlen)); in dirent_terminate()
/freebsd/sys/contrib/openzfs/tests/zfs-tests/cmd/
H A Dcp_files.c39 if (dirent->d_name[0] == '.' && in main()
40 (dirent->d_name[1] == '.' || dirent->d_name[1] == '\0')) in main()
43 int fd = openat(tfd, dirent->d_name, O_CREAT|O_WRONLY, 0666); in main()
46 argv[2], dirent->d_name, strerror(errno)); in main()
/freebsd/usr.sbin/pw/
H A Drm_r.c60 if (strcmp(e->d_name, ".") == 0 || strcmp(e->d_name, "..") == 0) in rm_r()
63 if (fstatat(dirfd, e->d_name, &st, AT_SYMLINK_NOFOLLOW) != 0) in rm_r()
66 rm_r(dirfd, e->d_name, uid); in rm_r()
68 unlinkat(dirfd, e->d_name, 0); in rm_r()
H A Dcpdir.c71 if (strcmp(e->d_name, ".") == 0 || strcmp(e->d_name, "..") == 0) in copymkdir()
74 p = e->d_name; in copymkdir()
82 copymkdir(homefd, p, openat(skelfd, e->d_name, O_DIRECTORY), in copymkdir()
88 (len = readlinkat(skelfd, e->d_name, lnk, sizeof(lnk) -1)) in copymkdir()
99 if ((srcfd = openat(skelfd, e->d_name, O_RDONLY)) == -1) in copymkdir()
/freebsd/contrib/diff/src/
H A Ddir.c94 char *d_name = next->d_name; in dir_read() local
98 if (d_name[0] == '.' in dir_read()
99 && (d_name[1] == 0 || (d_name[1] == '.' && d_name[2] == 0))) in dir_read()
102 if (excluded_filename (excluded, d_name)) in dir_read()
112 memcpy (data + data_used, d_name, d_size); in dir_read()
/freebsd/contrib/openbsm/bin/auditdistd/
H A Dtrail.c187 if (strncmp(dp->d_name, trail->tr_filename, HALF_LEN + 1) == 0) in trail_find()
192 PJDLOG_VERIFY(strlcpy(trail->tr_filename, dp->d_name, in trail_find()
338 if (dp->d_name[0] < '0' || dp->d_name[0] > '9') in trail_next()
341 dp->d_type = trail_type(trail->tr_dirfp, dp->d_name); in trail_next()
346 trail->tr_dirname, dp->d_name); in trail_next()
350 if (curfile[0] != '\0' && strcmp(dp->d_name, curfile) > 0) in trail_next()
354 strcmp(dp->d_name, trail->tr_filename) <= 0) { in trail_next()
357 PJDLOG_VERIFY(strlcpy(curfile, dp->d_name, sizeof(curfile)) < in trail_next()
537 if (dp->d_name[0] < '0' || dp->d_name[0] > '9') in trail_last()
540 dp->d_type = trail_type(dirfp, dp->d_name); in trail_last()
[all …]
/freebsd/lib/libc/gen/
H A Dreaddir-compat11.c53 if (srcdp->d_namlen >= sizeof(dstdp->d_name)) in freebsd11_cvtdirent()
59 bcopy(srcdp->d_name, dstdp->d_name, dstdp->d_namlen); in freebsd11_cvtdirent()
60 bzero(dstdp->d_name + dstdp->d_namlen, in freebsd11_cvtdirent()
61 dstdp->d_reclen - offsetof(struct freebsd11_dirent, d_name) - in freebsd11_cvtdirent()
H A Dscandir.c97 bcopy(d->d_name, p->d_name, p->d_namlen + 1); in scandir_b_dirp()
187 return (strcoll((*d1)->d_name, (*d2)->d_name)); in alphasort()
194 return (strverscmp((*d1)->d_name, (*d2)->d_name)); in versionsort()
H A Dgetcwd.c49 (dp->d_name[0] == '.' && (dp->d_name[1] == '\0' || \
50 (dp->d_name[1] == '.' && dp->d_name[2] == '\0')))
171 if (fstatat(_dirfd(dir), dp->d_name, &s, in __ssp_real()
205 bcopy(dp->d_name, bpt, dp->d_namlen); in __ssp_real()
H A Dscandir-compat11.c92 bcopy(d->d_name, p->d_name, p->d_namlen + 1); in freebsd11_scandir()
135 return (strcoll((*d1)->d_name, (*d2)->d_name)); in freebsd11_alphasort()
/freebsd/tests/sys/fs/fusefs/
H A Dreaddir.cc88 strncpy(ents[1].d_name, dot, ents[1].d_namlen); in TEST_F()
102 EXPECT_EQ(0, strcmp(dotdot, de->d_name)); in TEST_F()
110 EXPECT_EQ(0, strcmp(dot, de->d_name)); in TEST_F()
359 EXPECT_EQ(0, strcmp(nul, de->d_name)); in TEST_F()
386 snprintf(it.d_name, MAXNAMLEN, "file.%d", i); in TEST_F()
389 it.d_namlen = strlen(it.d_name); in TEST_F()
394 snprintf(it.d_name, MAXNAMLEN, "file.%d", i); in TEST_F()
397 it.d_namlen = strlen(it.d_name); in TEST_F()
402 snprintf(it.d_name, MAXNAMLEN, "file.%d", i); in TEST_F()
405 it.d_namlen = strlen(it.d_name); in TEST_F()
[all …]
/freebsd/stand/common/
H A Dls.c113 if (strcmp(d->d_name, ".") && strcmp(d->d_name, "..")) { in command_ls()
118 buf = malloc(strlen(path) + strlen(d->d_name) + 2); in command_ls()
120 sprintf(buf, "%s/%s", path, d->d_name); in command_ls()
132 (int)sb.st_size, d->d_name); in command_ls()
135 typestr[d->d_type? d->d_type:sb.st_mode >> 12], d->d_name); in command_ls()
/freebsd/crypto/openssh/openbsd-compat/
H A Dgetcwd.c47 (dp->d_name[0] == '.' && (dp->d_name[1] == '\0' || \
48 (dp->d_name[1] == '.' && dp->d_name[2] == '\0')))
175 memcpy(bup, dp->d_name, dp->d_namlen + 1); in getcwd()
212 memcpy(bpt, dp->d_name, dp->d_namlen); in getcwd()
/freebsd/sbin/ldconfig/
H A Delfhints.c121 if ((len = strlen(dp->d_name)) < 9 || in list_elf_hints()
122 strncmp(dp->d_name, "lib", 3) != 0) in list_elf_hints()
124 name = dp->d_name + 3; in list_elf_hints()
125 vers = dp->d_name + len; in list_elf_hints()
126 while (vers > dp->d_name && isdigit(*(vers-1))) in list_elf_hints()
128 if (vers == dp->d_name + len) in list_elf_hints()
130 if (vers < dp->d_name + 4 || in list_elf_hints()
137 namelen, name, vers, dirs[i], dp->d_name); in list_elf_hints()
/freebsd/sys/contrib/openzfs/lib/libzutil/os/linux/
H A Dzutil_device_path_os.c261 if (!zfs_isnumber(ep->d_name)) in zfs_get_pci_slots_sys_path()
265 "/sys/bus/pci/slots/%s/address", ep->d_name); in zfs_get_pci_slots_sys_path()
275 ep->d_name) == -1) { in zfs_get_pci_slots_sys_path()
344 if (strstr(ep->d_name, "enclosure_device") == NULL) in zfs_get_enclosure_sysfs_path()
349 if (asprintf(&tmp2, "%s/%s", tmp1, ep->d_name) == -1) { in zfs_get_enclosure_sysfs_path()
473 first_path = strdup(ep->d_name); in dm_get_underlying_path()
476 zfs_get_enclosure_sysfs_path(ep->d_name); in dm_get_underlying_path()
481 if (asprintf(&path, "/dev/%s", ep->d_name) == -1) in dm_get_underlying_path()
/freebsd/usr.sbin/cron/cron/
H A Ddatabase.c81 if (dp->d_name[0] == '.') in load_database()
83 ret = fstatat(dirfd(dir), dp->d_name, &st, 0); in load_database()
132 if (dp->d_name[0] == '.') in load_database()
134 if (fstatat(dirfd(dir), dp->d_name, &st, 0) == 0 && in load_database()
138 syscrontabs[i].name, dp->d_name); in load_database()
162 if (dp->d_name[0] == '.') in load_database()
165 (void) strncpy(fname, dp->d_name, sizeof(fname)); in load_database()
/freebsd/crypto/heimdal/lib/krb5/
H A Dkuserok.c153 if(strcmp(dent->d_name, ".") == 0 || in check_directory()
154 strcmp(dent->d_name, "..") == 0 || in check_directory()
155 dent->d_name[0] == '#' || /* emacs autosave */ in check_directory()
156 dent->d_name[strlen(dent->d_name) - 1] == '~') /* emacs backup */ in check_directory()
158 snprintf(filename, sizeof(filename), "%s/%s", dirname, dent->d_name); in check_directory()
/freebsd/contrib/wireguard-tools/
H A Dipc-uapi-unix.h103 len = strlen(ent->d_name); in userspace_get_wireguard_interfaces()
106 end = &ent->d_name[len - strlen(SOCK_SUFFIX)]; in userspace_get_wireguard_interfaces()
110 if (!userspace_has_wireguard_interface(ent->d_name)) in userspace_get_wireguard_interfaces()
112 ret = string_list_add(list, ent->d_name); in userspace_get_wireguard_interfaces()
/freebsd/sys/contrib/openzfs/cmd/zed/
H A Dzed_conf.c362 if (direntp->d_name[0] == '.') in zed_conf_scan_dir()
366 "%s/%s", zcp->zedlet_dir, direntp->d_name); in zed_conf_scan_dir()
369 direntp->d_name, strerror(ENAMETOOLONG)); in zed_conf_scan_dir()
380 direntp->d_name); in zed_conf_scan_dir()
386 direntp->d_name); in zed_conf_scan_dir()
392 direntp->d_name); in zed_conf_scan_dir()
398 direntp->d_name); in zed_conf_scan_dir()
404 direntp->d_name); in zed_conf_scan_dir()
407 if (zed_strings_add(zedlets, NULL, direntp->d_name) < 0) { in zed_conf_scan_dir()
410 direntp->d_name, strerror(errno)); in zed_conf_scan_dir()
[all …]
/freebsd/tools/test/stress2/misc/
H A Dkinfo2.sh139 dp->d_name, (uintmax_t)dp->d_fileno, dp->d_type,
144 (dp->d_name[0] >= '0' && dp->d_name[0] <= '9')) {
145 l = strtol(dp->d_name, &dummy, 10);
H A Dnamecache.sh138 if (strcmp(path, dp->d_name) == 0) {
140 if (stat(dp->d_name, &statb) == -1) {
141 warn("stat(%s)", dp->d_name);
144 dp->d_name, (uintmax_t)dp->d_fileno, dp->d_type,
/freebsd/lib/libufs/
H A Dtype.c64 free((char *)(uintptr_t)disk->d_name); in ufs_disk_close()
65 disk->d_name = NULL; in ufs_disk_close()
181 disk->d_name = name; in ufs_disk_fillout_blank()
196 fd = open(disk->d_name, O_RDWR); in ufs_disk_write()
/freebsd/sbin/fsck/
H A Dpreen.c63 char *d_name; /* disk base name */ member
264 if (strncmp(d->d_name, name, len) == 0 && d->d_name[len] == 0) in finddisk()
268 d->d_name = estrdup(name); in finddisk()
269 d->d_name[len] = '\0'; in finddisk()
287 (void) printf("disk %s: ", d->d_name); in printpart()

12345678910>>...20