Home
last modified time | relevance | path

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

12345678910>>...13

/illumos-gate/usr/src/contrib/ast/src/lib/libast/dir/
H A Dgetdents.c103 u = up->d_name;
104 while ((*u = *sp++) && u < up->d_name + MAXNAMLEN) u++;
106 … up->d_reclen = sizeof(struct dirent) - sizeof(up->d_name) + (up->d_namlen = u - up->d_name) + 1;
120 #define MAXREC roundof(sizeof(*up)-sizeof(up->d_name)+sizeof(sp->d_name)+1,8)
128 char tmp[sizeof(sp->d_name) + 1];
146 s = sp->d_name;
148 while (s < sp->d_name + sizeof(sp->d_name) && *s)
151 strcpy(up->d_name, tmp);
152 up->d_reclen = sizeof(struct dirent) - sizeof(up->d_name) + (up->d_namlen = u - tmp) + 1;
/illumos-gate/usr/src/cmd/chgrp/
H A Dchgrp.c381 if ((strcmp(dp->d_name, ".") == 0) || in chgrpr()
382 (strcmp(dp->d_name, "..") == 0)) { in chgrpr()
385 if (lstat(dp->d_name, &st) < 0) { in chgrpr()
386 status += Perror(dp->d_name); in chgrpr()
398 LCHOWN(dp->d_name, -1, gid); in chgrpr()
400 if (stat(dp->d_name, &st2) < 0) { in chgrpr()
401 status += Perror(dp->d_name); in chgrpr()
425 chgrpr(dp->d_name, gid); in chgrpr()
432 dp->d_name, in chgrpr()
445 dp->d_name); in chgrpr()
[all …]
/illumos-gate/usr/src/cmd/allocate/
H A Dmkdevalloc.c263 if (strncmp(dep->d_name, "rst", SIZE_OF_RST) && in dotape()
264 strncmp(dep->d_name, "nrst", SIZE_OF_NRST)) in dotape()
275 nm = (char *)malloc(SIZE_OF_TMP + 1 + strlen(dep->d_name) + 1); in dotape()
279 (void) strcat(nm, dep->d_name); in dotape()
322 if (strncmp(dep->d_name, ".", 1) == 0) in dotape()
333 nm = (char *)malloc(SIZE_OF_RMT + 1 + strlen(dep->d_name) + 1); in dotape()
337 (void) strcat(nm, dep->d_name); in dotape()
341 nm = (char *)malloc(SIZE_OF_TMP + strlen(dep->d_name) + 1); in dotape()
345 (void) strcat(nm, dep->d_name); in dotape()
348 (void) sscanf(dep->d_name, "%d", &tape[i].number); in dotape()
[all …]
/illumos-gate/usr/src/ucbhead/sys/
H A Ddir.h74 char d_name[MAXNAMLEN+1]; /* name of entry */ member
81 char d_name[MAXNAMLEN+1]; /* name of entry */
89 char d_name[MAXNAMLEN+1]; /* name of entry */ member
102 ((sizeof (struct direct) - sizeof ((dp)->d_name) + \
103 (strlen((dp)->d_name)+1) + 3) & ~3)
106 ((sizeof (struct direct64) - sizeof ((dp)->d_name) + \
107 (strlen((dp)->d_name)+1) + 3) & ~3)
111 ((sizeof (struct direct64) - sizeof ((dp)->d_name) + \
112 (strlen((dp)->d_name)+1) + 3) & ~3)
/illumos-gate/usr/src/uts/common/sys/
H A Ddirent.h48 char d_name[1]; /* name of file */ member
59 char d_name[1]; /* name of file */ member
73 char d_name[1]; /* name of file */ member
81 ((offsetof(dirent64_t, d_name[0]) + 1 + (namelen) + 7) & ~ 7)
83 ((reclen) - (offsetof(dirent64_t, d_name[0])))
85 ((offsetof(dirent32_t, d_name[0]) + 1 + (namelen) + 3) & ~ 3)
87 ((reclen) - (offsetof(dirent32_t, d_name[0])))
/illumos-gate/usr/src/lib/libcmdutils/common/
H A Dprocess_xattrs.c123 if ((dp->d_name[0] == '.' && dp->d_name[1] == '\0') || in mv_xattrs()
124 (dp->d_name[0] == '.' && dp->d_name[1] == '.' && in mv_xattrs()
125 dp->d_name[2] == '\0') || in mv_xattrs()
126 (sysattr_type(dp->d_name) == _RO_SATTR) || in mv_xattrs()
127 (sysattr_type(dp->d_name) == _RW_SATTR)) in mv_xattrs()
130 if ((sattrfd = openat(indfd, dp->d_name, in mv_xattrs()
141 if ((tattrfd = openat(outdfd, dp->d_name, in mv_xattrs()
152 if (writefile(sattrfd, tattrfd, infile, outfile, dp->d_name, in mv_xattrs()
153 dp->d_name, &st1, &st2) != 0) { in mv_xattrs()
166 res = sysattr_list(cmd, sattrfd, dp->d_name); in mv_xattrs()
[all …]
/illumos-gate/usr/src/cmd/chown/
H A Dchown.c391 if (strcmp(dp->d_name, ".") == 0 || /* skip . and .. */ in chownr()
392 strcmp(dp->d_name, "..") == 0) { in chownr()
395 if (lstat(dp->d_name, &st) < 0) { in chownr()
396 status += Perror(dp->d_name); in chownr()
408 LCHOWN(dp->d_name, uid, gid); in chownr()
410 if (stat(dp->d_name, &st2) < 0) { in chownr()
411 status += Perror(dp->d_name); in chownr()
435 chownr(dp->d_name, in chownr()
447 dp->d_name); in chownr()
456 CHOWN(dp->d_name, uid, gid); in chownr()
[all …]
/illumos-gate/usr/src/ucblib/libucb/port/gen/
H A Dscandir.c65 ((sizeof (struct direct) - sizeof ((dp)->d_name) + \
66 (strlen((dp)->d_name)+1) + 3) & ~3)
109 for (cp1 = p->d_name, cp2 = d->d_name; *cp1++ = *cp2++; ) in scandir64()
179 for (cp1 = p->d_name, cp2 = d->d_name; *cp1++ = *cp2++; ) in scandir()
210 return (strcmp((*d1)->d_name, (*d2)->d_name)); in alphasort()
217 return (strcmp((*d1)->d_name, (*d2)->d_name)); in alphasort64()
H A Dreaddir.c84 dc64.d_namlen = (ushort_t)strlen(dp->d_name); in internal_readdir()
89 (void) strcpy(dc64.d_name, dp->d_name); in internal_readdir()
110 (void) strcpy(dc.d_name, dc64.d_name); in readdir()
/illumos-gate/usr/src/cmd/make/bin/
H A Dfiles.cc346 ((dp->d_name[0] == (int) period_char) && in read_dir()
347 ((dp->d_name[1] == 0) || in read_dir()
348 ((dp->d_name[1] == (int) period_char) && in read_dir()
349 (dp->d_name[2] == 0))))) { in read_dir()
356 MBSTOWCS(tmp_wcs_buffer, dp->d_name); in read_dir()
383 if ((dp->d_name[0] == 's') && in read_dir()
384 (dp->d_name[1] == (int) period_char)) { in read_dir()
386 MBSTOWCS(tmp_wcs_buffer, dp->d_name + 2); in read_dir()
398 MBSTOWCS(tmp_wcs_buffer, dp->d_name + 2); in read_dir()
492 ((dp->d_name[0] == (int) period_char) && in read_dir()
[all …]
/illumos-gate/usr/src/cmd/svr4pkg/libinst/
H A Dscriptvfy.l778 printf("Looking at file %s\n", dp->d_name);
815 if (dp->d_name[0] == '.')
818 if ((strcmp(dp->d_name, "preinstall") == 0) ||
819 (strcmp(dp->d_name, "preremove") == 0)) {
820 sprintf(path, "%s/%s", inst_dir, dp->d_name);
821 retval |= pre_valid(dp->d_name, path, silent);
825 if ((strncmp(dp->d_name, "i.", 2) == 0) ||
826 (strncmp(dp->d_name, "r.", 2) == 0)) {
827 sprintf(path, "%s/%s", inst_dir, dp->d_name);
828 retval |= cas_valid(dp->d_name, path, silent);
[all …]
/illumos-gate/usr/src/cmd/cron/
H A Datq.c237 if ((stat(queue[i]->d_name, &stbuf)) < 0) { in countfiles()
290 if ((stat(queue[i]->d_name, &stbuf)) < 0) { in printqueue()
293 curqueue = *(strchr(queue[i]->d_name, '.') + 1); in printqueue()
311 printdate(queue[i]->d_name); in printqueue()
313 printf("%-14s ", queue[i]->d_name); in printqueue()
315 printjobname(queue[i]->d_name); in printqueue()
467 if ((p1 = strchr((*d1)->d_name, '.')) == NULL) in creation()
469 if ((p2 = strchr((*d2)->d_name, '.')) == NULL) in creation()
476 if (stat((*d1)->d_name, &stbuf1) < 0) in creation()
479 if (stat((*d2)->d_name, &stbuf2) < 0) in creation()
[all …]
/illumos-gate/usr/src/stand/lib/fs/nfs/
H A Dgetdents4.c57 ((offsetof(dirent_t, d_name[0]) + 1 + (namelen) + 7) & ~ 7)
194 dep->d_name[0] = '.'; in nfs4getdents()
195 dep->d_name[1] = '\0'; in nfs4getdents()
209 dep->d_name[0] = '.'; in nfs4getdents()
210 dep->d_name[1] = '.'; in nfs4getdents()
211 dep->d_name[2] = '\0'; in nfs4getdents()
240 bcopy(ep->b_name.utf8string_val, dep->d_name, namlen); in nfs4getdents()
241 dep->d_name[namlen] = '\0'; in nfs4getdents()
/illumos-gate/usr/src/cmd/ypcmd/
H A Dypserv_ancil.c96 namesz = (int)strlen(dp->d_name);
101 ext = &(dp->d_name[namesz - (sizeof (dbm_pag) - 1)]);
114 if (0 != strncmp(dp->d_name, NTOL_PREFIX,
122 mapname = dp->d_name + strlen(NTOL_PREFIX);
124 if (0 == strncmp(dp->d_name, NTOL_PREFIX,
127 mapname = dp->d_name;
/illumos-gate/usr/src/lib/fm/topo/modules/common/pcibus/
H A Dpci_sensor.c55 if (strcmp(ent->d_name, ".") == 0 || in pci_create_dev_scandir()
56 strcmp(ent->d_name, "..") == 0) { in pci_create_dev_scandir()
61 ent->d_name) >= sizeof (spath)) { in pci_create_dev_scandir()
63 "for %s/%s, path too long", path, ent->d_name); in pci_create_dev_scandir()
71 ent->d_name)) < 0) { in pci_create_dev_scandir()
/illumos-gate/usr/src/cmd/acpi/acpidump/
H A Dosunixdir.c255 if (!fnmatch (ExternalInfo->WildcardSpec, dir_entry->d_name, 0)) in AcpiOsGetNextFilename()
257 if (dir_entry->d_name[0] == '.') in AcpiOsGetNextFilename()
262 str_len = strlen (dir_entry->d_name) + in AcpiOsGetNextFilename()
275 strcat (temp_str, dir_entry->d_name); in AcpiOsGetNextFilename()
297 strcpy (ExternalInfo->temp_buffer, dir_entry->d_name); in AcpiOsGetNextFilename()
/illumos-gate/usr/src/cmd/svr4pkg/pkginstall/
H A Dmerginfo.c452 if (dp->d_name[0] == '.') in merginfo()
456 instdir, dp->d_name); in merginfo()
459 dp->d_name); in merginfo()
464 dp->d_name); in merginfo()
466 progerr(ERR_CREATE_PATH_2, pkgbin, dp->d_name); in merginfo()
471 progerr(ERR_CANNOT_COPY, dp->d_name, pkgbin); in merginfo()
495 if (dp->d_name[0] == '.') in merginfo()
504 if (strcmp(dp->d_name, "i.none") == 0) in merginfo()
508 instdir, dp->d_name); in merginfo()
512 "/install/", dp->d_name); in merginfo()
[all …]
/illumos-gate/usr/src/boot/common/
H A Dls.c115 if (strcmp(d->d_name, ".") && strcmp(d->d_name, "..")) { in command_ls()
120 buf = malloc(strlen(path) + strlen(d->d_name) + 2); in command_ls()
122 sprintf(buf, "%s/%s", path, d->d_name); in command_ls()
134 (int)sb.st_size, d->d_name); in command_ls()
137 typestr[d->d_type? d->d_type:sb.st_mode >> 12], d->d_name); in command_ls()
/illumos-gate/usr/src/uts/i86pc/io/dr/
H A Ddr_quiesce.c360 char d_name[40], d_alias[40], *d_info; in dr_suspend_devices() local
391 d_name[0] = 0; in dr_suspend_devices()
392 if (dr_resolve_devname(dip, d_name, d_alias) == 0) { in dr_suspend_devices()
395 d_name, d_info, d_alias); in dr_suspend_devices()
397 prom_printf("\tsuspending %s@%s\n", d_name, in dr_suspend_devices()
406 d_name[0] ? d_name : dname, d_info); in dr_suspend_devices()
416 d_name[0] ? d_name : dname, d_info); in dr_suspend_devices()
457 char d_name[40], d_alias[40], *d_info; in dr_resume_devices() local
459 d_name[0] = 0; in dr_resume_devices()
464 if (!dr_resolve_devname(dip, d_name, d_alias)) { in dr_resume_devices()
[all …]
/illumos-gate/usr/src/uts/sun4u/ngdr/io/
H A Ddr_quiesce.c361 char d_name[40], d_alias[40], *d_info; in dr_suspend_devices() local
392 d_name[0] = 0; in dr_suspend_devices()
393 if (dr_resolve_devname(dip, d_name, d_alias) == 0) { in dr_suspend_devices()
396 d_name, d_info, d_alias); in dr_suspend_devices()
398 prom_printf("\tsuspending %s@%s\n", d_name, in dr_suspend_devices()
407 d_name[0] ? d_name : dname, d_info); in dr_suspend_devices()
417 d_name[0] ? d_name : dname, d_info); in dr_suspend_devices()
458 char d_name[40], d_alias[40], *d_info; in dr_resume_devices() local
460 d_name[0] = 0; in dr_resume_devices()
465 if (!dr_resolve_devname(dip, d_name, d_alias)) { in dr_resume_devices()
[all …]
/illumos-gate/usr/src/cmd/mv/
H A Dmv.c1270 if ((strcmp(dp->d_name, ".") == 0) || in rcopy()
1271 (strcmp(dp->d_name, "..") == 0)) in rcopy()
1273 if (strlen(from)+1+strlen(dp->d_name) >= in rcopy()
1277 cmd, from, dp->d_name); in rcopy()
1282 "%s/%s", from, dp->d_name); in rcopy()
1759 " %s: %s"), cmd, dp->d_name,
1775 "%s\n"), cmd, dp->d_name, target);
1784 dp->d_name, dp->d_name, &s3, &s4) != 0) {
1800 " %s: "), cmd, dp->d_name, target);
1812 if (utimensat(targetdirfd, dp->d_name, times, 0) < 0) {
[all …]
/illumos-gate/usr/src/cmd/lp/lib/lp/
H A Dnext.c76 STREQU(direntp->d_name, ".")
77 || STREQU(direntp->d_name, "..")
78 || !is(parent, direntp->d_name, what)
83 if (!(ret = Strdup(direntp->d_name)))
/illumos-gate/usr/src/lib/libdevinfo/
H A Ddevinfo_finddev.c123 if ((strcmp(dp->d_name, ".") == 0) || in finddev_readdir_alt()
124 (strcmp(dp->d_name, "..") == 0)) in finddev_readdir_alt()
140 if ((strcmp(dp->d_name, ".") == 0) || in finddev_readdir_alt()
141 (strcmp(dp->d_name, "..") == 0)) in finddev_readdir_alt()
151 handle->paths[n] = strdup(dp->d_name); in finddev_readdir_alt()
272 if ((strcmp(dp->d_name, ".") == 0) || in finddev_emptydir_alt()
273 (strcmp(dp->d_name, "..") == 0)) in finddev_emptydir_alt()
/illumos-gate/usr/src/lib/libdiskmgt/common/
H A Dinuse_fs.c202 if (strcmp(dp->d_name, ".") == 0 || in load_heuristics()
203 strcmp(dp->d_name, "..") == 0) { in load_heuristics()
214 if (strcmp(dp->d_name, "zfs") == 0) in load_heuristics()
218 dp->d_name); in load_heuristics()
229 if (strcmp(sdp->d_name, "fstyp") == 0) { in load_heuristics()
233 "/usr/lib/fs/%s/fstyp", dp->d_name); in load_heuristics()
255 if ((hp->type = strdup(dp->d_name)) == NULL) { in load_heuristics()
/illumos-gate/usr/src/lib/sun_fc/common/
H A DHBANPIVPort.cc92 if (strcmp(dirp->d_name, ".") == 0 || in lookupControllerPath()
93 strcmp(dirp->d_name, "..") == 0) { in lookupControllerPath()
96 sprintf(node, "%s/%s", dir, dirp->d_name); in lookupControllerPath()
102 cfg_path += dirp->d_name; in lookupControllerPath()

12345678910>>...13