| /freebsd/tests/sys/fs/fusefs/ |
| H A D | readdir.cc | 81 ents[0].d_namlen = sizeof(dotdot); in TEST_F() 83 strncpy(ents[0].d_name, dotdot, ents[0].d_namlen); in TEST_F() 86 ents[1].d_namlen = sizeof(dot); in TEST_F() 88 strncpy(ents[1].d_name, dot, ents[1].d_namlen); in TEST_F() 101 EXPECT_EQ(sizeof(dotdot), de->d_namlen); in TEST_F() 109 EXPECT_EQ(sizeof(dot), de->d_namlen); in TEST_F() 207 ents0[0].d_namlen = sizeof(dotdot); in TEST_F() 209 strncpy(ents0[0].d_name, dotdot, ents0[0].d_namlen); in TEST_F() 213 ents0[1].d_namlen = sizeof(dot); in TEST_F() 217 ents1[0].d_namlen = sizeof(dot); in TEST_F() [all …]
|
| /freebsd/lib/libc/gen/ |
| H A D | readdir-compat11.c | 53 if (srcdp->d_namlen >= sizeof(dstdp->d_name)) in freebsd11_cvtdirent() 56 dstdp->d_namlen = srcdp->d_namlen; 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() 62 dstdp->d_namlen); in freebsd11_cvtdirent()
|
| H A D | scandir-compat11.c | 91 p->d_namlen = d->d_namlen; in freebsd11_scandir() 92 bcopy(d->d_name, p->d_name, p->d_namlen + 1); in freebsd11_scandir()
|
| H A D | getcwd.c | 186 while (bpt - pt < dp->d_namlen + (first ? 1 : 2)) { in __ssp_real() 204 bpt -= dp->d_namlen; in __ssp_real() 205 bcopy(dp->d_name, bpt, dp->d_namlen); in __ssp_real()
|
| H A D | scandir.c | 96 p->d_namlen = d->d_namlen; in scandir_dirp_b() 97 memcpy(p->d_name, d->d_name, p->d_namlen + 1); in scandir_dirp_b()
|
| H A D | gen-compat.h | 34 (((dp)->d_namlen + 1 + 3) &~ 3))
|
| /freebsd/sys/sys/ |
| H A D | dirent.h | 69 __uint16_t d_namlen; /* length of string in d_name */ member 84 __uint8_t d_namlen; /* length of string in d_name */ member 121 #define _GENERIC_DIRSIZ(dp) _GENERIC_DIRLEN((dp)->d_namlen) 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/fs/cd9660/ |
| H A D | cd9660_vnops.c | 384 cl = idp->current.d_namlen; in iso_shipdir() 394 if (!(sl = dp->d_namlen)) { in iso_shipdir() 397 sl = dp->d_namlen - 1; in iso_shipdir() 402 if (idp->assocent.d_namlen) { in iso_shipdir() 405 idp->assocent.d_namlen = 0; in iso_shipdir() 407 if (idp->saveent.d_namlen) { in iso_shipdir() 410 idp->saveent.d_namlen = 0; in iso_shipdir() 453 idp->saveent.d_namlen = idp->assocent.d_namlen = 0; in cd9660_readdir() 523 idp->current.d_namlen = isonum_711(ep->name_len); in cd9660_readdir() 525 if (reclen < ISO_DIRECTORY_RECORD_SIZE + idp->current.d_namlen) { in cd9660_readdir() [all …]
|
| /freebsd/sys/ufs/ufs/ |
| H A D | dir.h | 80 uint8_t d_namlen; /* length of string in d_name */ member 115 ((oldfmt) ? DIRECTSIZ((dp)->d_type) : DIRECTSIZ((dp)->d_namlen)) 118 DIRECTSIZ((dp)->d_namlen)
|
| H A D | ufs_lookup.c | 418 namlen = ep->d_namlen; in ufs_lookup_ino() 420 namlen = ep->d_namlen; in ufs_lookup_ino() 777 namlen = ep->d_namlen; in ufs_dirbadentry() 779 namlen = ep->d_namlen; in ufs_dirbadentry() 818 newdirp->d_namlen = namelen; in ufs_makedirentry() 830 { uint8_t tmp = newdirp->d_namlen; in ufs_makedirentry() 831 newdirp->d_namlen = newdirp->d_type; in ufs_makedirentry() 1033 namlen = ep->d_namlen; in ufs_direnter() 1035 namlen = ep->d_namlen; in ufs_direnter() 1038 (ep->d_ino == UFS_WINO && namlen == dirp->d_namlen && in ufs_direnter() [all …]
|
| H A D | ufs_dirhash.c | 453 slot = ufsdirhash_hash(dh, ep->d_name, ep->d_namlen); in ufsdirhash_build() 645 if (dp->d_namlen == namelen && in ufsdirhash_lookup() 825 slot = ufsdirhash_hash(dh, dirp->d_name, dirp->d_namlen); in ufsdirhash_add() 857 slot = ufsdirhash_findslot(dh, dirp->d_name, dirp->d_namlen, offset); in ufsdirhash_remove() 885 slot = ufsdirhash_findslot(dh, dirp->d_name, dirp->d_namlen, oldoff); in ufsdirhash_move() 1010 ufsdirhash_findslot(dh, dp->d_name, dp->d_namlen, offset + i); in ufsdirhash_checkblock()
|
| /freebsd/crypto/openssh/openbsd-compat/ |
| H A D | getcwd.c | 175 memcpy(bup, dp->d_name, dp->d_namlen + 1); in getcwd() 192 if (bpt - pt < dp->d_namlen + (first ? 1 : 2)) { in getcwd() 211 bpt -= dp->d_namlen; in getcwd() 212 memcpy(bpt, dp->d_name, dp->d_namlen); in getcwd()
|
| /freebsd/lib/libc/tests/gen/ |
| H A D | opendir_test.c | 37 ATF_CHECK_EQ(1, ent->d_namlen); in opendir_check() 41 ATF_CHECK_EQ(2, ent->d_namlen); in opendir_check() 45 ATF_CHECK_EQ(sizeof("subdir") - 1, ent->d_namlen); in opendir_check()
|
| /freebsd/sbin/restore/ |
| H A D | dirs.c | 167 nulldir.d_namlen = 1; in extractdirs() 256 if (namelen + dp->d_namlen >= sizeof(locname)) { in treescan() 313 } while (dp->d_namlen != len || strncmp(dp->d_name, name, len) != 0); in searchdir() 333 dp->d_namlen = dp->d_type; in putdir() 335 if (!Bcvt && dp->d_namlen == 0) in putdir() 336 dp->d_namlen = dp->d_type; in putdir() 345 || dp->d_namlen > NAME_MAX in putdir() 357 if (dp->d_namlen > NAME_MAX) in putdir() 360 dp->d_namlen, NAME_MAX); in putdir()
|
| H A D | interactive.c | 541 if (namelen + dp->d_namlen >= MAXPATHLEN) { in printlist() 717 adirent.d_namlen = dp->d_namlen; in glob_readdir() 718 memmove(adirent.d_name, dp->d_name, dp->d_namlen + 1); in glob_readdir()
|
| /freebsd/contrib/libarchive/tar/ |
| H A D | bsdtar_platform.h | 54 # define DIRENT_NAMLEN(dirent) (dirent)->d_namlen 60 # define DIRENT_NAMLEN(dirent) (dirent)->d_namlen
|
| /freebsd/contrib/pkgconf/libpkgconf/ |
| H A D | win-dirent.h | 211 #define _D_EXACT_NAMLEN(p) ((p)->d_namlen) 234 size_t d_namlen; member 274 size_t d_namlen; member 501 entry->d_namlen = n; in _wreaddir_r() 722 entry->d_namlen = n - 1; in readdir_r() 746 entry->d_namlen = 1; in readdir_r()
|
| /freebsd/sbin/fsck_ffs/ |
| H A D | dir.c | 345 if (dp->d_namlen != 0) { in dircheck() 346 dp->d_namlen = 0; in dircheck() 373 namlen = dp->d_namlen; in dircheck() 412 dp->d_ino, dp->d_reclen, dp->d_namlen, dp->d_type, in dircheck() 531 newent.d_namlen = strlen(idesc->id_name); in mkentry() 545 dirp->d_namlen = newent.d_namlen; in mkentry() 546 memmove(dirp->d_name, idesc->id_name, (size_t)newent.d_namlen + 1); in mkentry() 555 if (memcmp(dirp->d_name, idesc->id_name, (int)dirp->d_namlen + 1)) in chgino()
|
| /freebsd/contrib/mandoc/ |
| H A D | test-dirent-namlen.c | 9 return sizeof(entry.d_namlen) == 0; in main()
|
| /freebsd/usr.sbin/makefs/ |
| H A D | makefs.h | 302 DIRECTSIZ((dp)->d_type) : DIRECTSIZ((dp)->d_namlen)) 306 DIRECTSIZ((dp)->d_type) : DIRECTSIZ((dp)->d_namlen))
|
| /freebsd/contrib/netbsd-tests/lib/libc/gen/ |
| H A D | t_glob.c | 133 dir.d_namlen = strlen(f->name); in gl_readdir() 140 dir.d_reclen = _DIRENT_RECLEN(&dir, dir.d_namlen); in gl_readdir()
|
| /freebsd/stand/userboot/test/ |
| H A D | test.c | 322 * Note: d_namlen is in the range 0..255 and therefore less 327 *namelen_return = dp->d_namlen; in test_copyout() 328 memcpy(name, dp->d_name, dp->d_namlen); in test_copyout() 329 name[dp->d_namlen] = 0; in test_copyout()
|
| /freebsd/sys/fs/fdescfs/ |
| H A D | fdesc_vnops.c | 574 dp->d_namlen = i + 1; in fdesc_readdir() 576 bcopy("..", dp->d_name, dp->d_namlen); in fdesc_readdir() 583 dp->d_namlen = sprintf(dp->d_name, "%d", fcnt); in fdesc_readdir() 593 if (dp->d_namlen != 0) { in fdesc_readdir()
|
| /freebsd/contrib/nvi/files/ |
| H A D | config.h.in | 25 /* Define if struct dirent has field d_namlen */
|
| /freebsd/contrib/ncurses/progs/ |
| H A D | progs.priv.h | 62 # define NAMLEN(dirent) (dirent)->d_namlen
|