Searched refs:dirp (Results 26 - 50 of 110) sorted by relevance

12345

/freebsd-current/tools/test/stress2/misc/
H A Dreaddir.sh147 DIR *dirp, fuzz;
153 if ((dirp = opendir(path)) == NULL)
155 bcopy(dirp, &fuzz, sizeof(fuzz));
158 closedir(dirp);
/freebsd-current/sbin/fsck_ffs/
H A Ddir.c527 struct direct *dirp = idesc->id_dirp; local
533 if (dirp->d_ino != 0)
534 oldlen = DIRSIZ(0, dirp);
537 if (dirp->d_reclen - oldlen < newlen)
539 newent.d_reclen = dirp->d_reclen - oldlen;
540 dirp->d_reclen = oldlen;
541 dirp = (struct direct *)(((char *)dirp) + oldlen);
542 dirp->d_ino = idesc->id_parent; /* ino to be entered is in id_parent */
543 dirp
553 struct direct *dirp = idesc->id_dirp; local
917 struct dirtemplate *dirp; local
[all...]
/freebsd-current/lib/libpam/modules/pam_xdg/
H A Dpam_xdg.c180 DIR *dirp; local
183 dirp = fdopendir(fd);
184 if (dirp == NULL)
187 while ((dp = readdir(dirp)) != NULL) {
202 closedir(dirp);
/freebsd-current/contrib/capsicum-test/
H A Dsyscalls.h25 inline int getdents_(unsigned int fd, void *dirp, unsigned int count) { argument
26 return getdents(fd, (char*)dirp, count);
158 static inline int getdents_(unsigned int fd, void *dirp, unsigned int count) { argument
159 return syscall(__NR_getdents, fd, dirp, count);
/freebsd-current/usr.bin/ruptime/
H A Druptime.c57 static DIR *dirp; variable
99 if (chdir(_PATH_RWHODIR) || (dirp = opendir(".")) == NULL)
188 rewinddir(dirp);
196 for (nhosts = hspace = 0; (dp = readdir(dirp)) != NULL;) {
/freebsd-current/usr.bin/rwho/
H A Drwho.c59 static DIR *dirp; variable
112 if ((dirp = opendir(".")) == NULL)
114 dfd = dirfd(dirp);
129 while ((dp = readdir(dirp)) != NULL) {
/freebsd-current/sbin/ldconfig/
H A Delfhints.c109 DIR *dirp; local
112 if ((dirp = opendir(dirs[i])) == NULL)
114 while ((dp = readdir(dirp)) != NULL) {
140 closedir(dirp);
/freebsd-current/cddl/contrib/opensolaris/lib/libdtrace/common/
H A Ddt_pragma.c213 dt_dirpath_t *dirp; local
217 for (dirp = dt_list_next(&dtp->dt_lib_path); dirp != NULL;
218 dirp = dt_list_next(dirp)) {
219 (void) snprintf(lib, len, "%s/%s", dirp->dir_path, lname);
/freebsd-current/usr.sbin/cpucontrol/
H A Dcpucontrol.c411 DIR *dirp; local
450 dirp = fdopendir(fwdfd);
451 if (dirp == NULL) {
458 while ((direntry = readdir(dirp)) != NULL) {
467 closedir(dirp);
472 error = closedir(dirp);
/freebsd-current/usr.sbin/lpr/common_source/
H A Dcommon.c118 DIR *dirp; local
122 if ((dirp = opendir(pp->spool_dir)) == NULL) {
126 if (fstat(dirfd(dirp), &stbuf) < 0)
142 while ((d = readdir(dirp)) != NULL) {
174 closedir(dirp);
181 closedir(dirp);
/freebsd-current/sys/fs/nfsserver/
H A Dnfs_nfsdserv.c117 vnode_t dirp, struct nfsvattr *dirforp, struct nfsvattr *diraftp,
123 vnode_t dirp, struct nfsvattr *dirforp, struct nfsvattr *diraftp,
592 vnode_t vp, dirp = NULL; local
624 nd->nd_repstat = nfsvno_namei(nd, &named, dp, 0, exp, &dirp);
630 if (dirp) {
632 dattr_ret = nfsvno_getattr(dirp, &dattr, nd, p,
634 vrele(dirp);
664 if (dirp) {
666 dattr_ret = nfsvno_getattr(dirp, &dattr, nd, p, 0,
668 vrele(dirp);
1156 vnode_t vp = NULL, dirp = NULL; local
1326 vnode_t vp, dirp = NULL; local
1540 vnode_t dirp = NULL; local
1793 vnode_t dirp = NULL, dp = NULL; local
1903 vnode_t dirp = NULL; local
1972 nfsrvd_symlinksub(struct nfsrv_descript *nd, struct nameidata *ndp, struct nfsvattr *nvap, fhandle_t *fhp, vnode_t *vpp, vnode_t dirp, struct nfsvattr *dirforp, struct nfsvattr *diraftp, int *diraft_retp, nfsattrbit_t *attrbitp, NFSACL_T *aclp, NFSPROC_T *p, struct nfsexstuff *exp, char *pathcp, int pathlen) argument
2024 vnode_t dirp = NULL; local
2104 nfsrvd_mkdirsub(struct nfsrv_descript *nd, struct nameidata *ndp, struct nfsvattr *nvap, fhandle_t *fhp, vnode_t *vpp, vnode_t dirp, struct nfsvattr *dirforp, struct nfsvattr *diraftp, int *diraft_retp, nfsattrbit_t *attrbitp, NFSACL_T *aclp, NFSPROC_T *p, struct nfsexstuff *exp) argument
2831 vnode_t vp = NULL, dirp = NULL; local
3699 vnode_t dirp = NULL, vp; local
3832 vnode_t dirp = NULL, vp; local
[all...]
/freebsd-current/sys/ufs/ufs/
H A Dufs_dirhash.c800 * Insert information into the hash about a new directory entry. dirp
805 ufsdirhash_add(struct inode *ip, struct direct *dirp, doff_t offset) argument
825 slot = ufsdirhash_hash(dh, dirp->d_name, dirp->d_namlen);
836 ufsdirhash_adjfree(dh, offset, -DIRSIZ(0, dirp));
842 * is defined by the name in `dirp', which must exist at the specified
846 ufsdirhash_remove(struct inode *ip, struct direct *dirp, doff_t offset) argument
857 slot = ufsdirhash_findslot(dh, dirp->d_name, dirp->d_namlen, offset);
863 ufsdirhash_adjfree(dh, offset, DIRSIZ(0, dirp));
872 ufsdirhash_move(struct inode *ip, struct direct *dirp, doff_t oldoff, doff_t newoff) argument
1147 ufsdirhash_getprev(struct direct *dirp, doff_t offset) argument
[all...]
H A Dufs_lookup.c841 * that it left in nameidata. The argument dirp is the new directory
849 ufs_direnter(struct vnode *dvp, struct vnode *tvp, struct direct *dirp, argument
867 newentrysize = DIRSIZ(OFSFMT(dvp), dirp);
902 dirp->d_reclen = DIRBLKSIZ;
905 bcopy((caddr_t)dirp, (caddr_t)bp->b_data + blkoff,newentrysize);
909 ufsdirhash_add(dp, dirp, I_OFFSET(dp));
928 dirp->d_ino, newdirbp, 1))
1040 (ep->d_ino == UFS_WINO && namlen == dirp->d_namlen &&
1041 bcmp(ep->d_name, dirp->d_name, dirp
[all...]
/freebsd-current/sbin/fsdb/
H A Dfsdb.c458 struct direct *dirp = idesc->id_dirp; local
461 slot++, diroff, dirp->d_ino, dirp->d_reclen,
462 typename[dirp->d_type], dirp->d_namlen, dirp->d_name);
463 diroff += dirp->d_reclen;
834 struct direct *dirp = idesc->id_dirp; local
837 dirp->d_ino = idesc->id_parent;
877 struct direct *dirp local
[all...]
/freebsd-current/contrib/tcsh/
H A Dtw.init.c159 struct dirent *dirp; local
164 if ((dirp = readdir(dfd)) != NULL) {
165 Strbuf_append(res, str2short(dirp->d_name));
202 DIR *dirp; local
220 if ((dirp = opendir(short2str(*pv))) == NULL)
223 cleanup_push(dirp, opendir_cleanup);
228 while ((dp = readdir(dirp)) != NULL) {
255 cleanup_until(dirp);
/freebsd-current/contrib/nvi/common/
H A Drecover.c500 DIR *dirp; local
511 if (chdir(p) || (dirp = opendir(".")) == NULL) {
517 for (found = 0; (dp = readdir(dirp)) != NULL;) {
590 (void)closedir(dirp);
605 DIR *dirp; local
618 if ((dirp = opendir(rp)) == NULL) {
626 for (found = requested = 0; (dp = readdir(dirp)) != NULL;) {
736 (void)closedir(dirp);
/freebsd-current/contrib/mandoc/
H A Dcompat_fts.c356 DIR *dirp; local
370 if ((dirp = opendir(cur->fts_accpath)) == NULL) {
402 for (head = tail = NULL, nitems = 0; dirp && (dp = readdir(dirp));) {
425 (void)closedir(dirp);
450 (void)closedir(dirp);
473 if (dirp)
474 (void)closedir(dirp);
/freebsd-current/usr.bin/whereis/
H A Dwhereis.c260 struct dirent *dirp; local
329 while ((dirp = readdir(dir)) != NULL) {
343 if (dirp->d_name[0] == '.' ||
350 (dirp->d_name[0] >= 'A' && dirp->d_name[0] <= 'Z') ||
351 strcmp(dirp->d_name, "distfiles") == 0)
353 if ((b = malloc(sizeof PATH_PORTS + 1 + dirp->d_namlen))
358 strcat(b, dirp->d_name);
/freebsd-current/stand/kboot/libkboot/
H A Dhost_syscalls.c46 host_getdents64(int fd, void *dirp, int count) argument
48 return host_syscall(SYS_getdents64, fd, (uintptr_t)dirp, count);
/freebsd-current/lib/libc/gen/
H A Dfts-compat.c609 fts_safe_readdir(DIR *dirp, int *readdir_errno) argument
614 if (!dirp)
616 ret = freebsd11_readdir(dirp);
642 DIR *dirp; local
663 if ((dirp = __opendir2(cur->fts_accpath, oflag)) == NULL) {
713 if (fts_safe_changedir(sp, cur, _dirfd(dirp), NULL)) {
751 (dp = fts_safe_readdir(dirp, &readdir_errno));) {
770 (void)closedir(dirp);
794 (void)closedir(dirp);
861 if (dirp)
[all...]
H A Dfts.c604 fts_safe_readdir(DIR *dirp, int *readdir_errno) argument
609 if (!dirp)
611 ret = readdir(dirp);
636 DIR *dirp; local
660 if ((dirp = __opendir2(cur->fts_accpath, oflag)) == NULL) {
710 if (fts_safe_changedir(sp, cur, _dirfd(dirp), NULL)) {
748 (dp = fts_safe_readdir(dirp, &readdir_errno));) {
767 (void)closedir(dirp);
812 p->fts_info = fts_stat(sp, p, 0, _dirfd(dirp));
844 if (dirp)
[all...]
H A Dfts-compat11.c606 fts_safe_readdir(DIR *dirp, int *readdir_errno) argument
611 if (!dirp)
613 ret = freebsd11_readdir(dirp);
638 DIR *dirp; local
662 if ((dirp = __opendir2(cur->fts_accpath, oflag)) == NULL) {
712 if (fts_safe_changedir(sp, cur, _dirfd(dirp), NULL)) {
750 (dp = fts_safe_readdir(dirp, &readdir_errno));) {
769 (void)closedir(dirp);
814 p->fts_info = fts_stat(sp, p, 0, _dirfd(dirp));
846 if (dirp)
[all...]
/freebsd-current/usr.sbin/mountd/
H A Dmountd.c211 static void del_mlist(char *hostp, char *dirp);
1353 xdr_dir(XDR *xdrsp, char *dirp) argument
1355 return (xdr_string(xdrsp, &dirp, MNTPATHLEN));
1553 char *cp, *endcp, *dirp, *hst, *usr, *dom, savedc; local
1584 dirp = NULL;
1638 if (dirp != NULL) {
1654 if (dirp != NULL) {
1669 dirp = unvis_dir;
1721 dirp = add_expdir(&dirhead, unvis_dir,
1818 getexp_err(ep, tgrp, "V4:root, no dirp, ignore
2650 dirp_search(struct dirlist *dp, char *dirp) argument
3112 do_mount(struct exportlist *ep, struct grouplist *grp, uint64_t exflags, struct expcred *anoncrp, char *dirp, int dirplen, struct statfs *fsb, int numsecflavors, int *secflavors) argument
3668 char *host, *dirp, *cp; local
3700 del_mlist(char *hostp, char *dirp) argument
3727 add_mlist(char *hostp, char *dirp) argument
3853 check_dirpath(char *dirp, char **err) argument
3882 check_statfs(const char *dirp, struct statfs *fsb, char **err) argument
[all...]
/freebsd-current/crypto/heimdal/appl/rcp/
H A Drcp.c363 DIR *dirp; local
367 if (!(dirp = opendir(name))) {
382 closedir(dirp);
391 closedir(dirp);
394 while ((dp = readdir(dirp)) != NULL) {
407 closedir(dirp);
/freebsd-current/usr.bin/msgs/
H A Dmsgs.c261 DIR *dirp; local
263 dirp = opendir(_PATH_MSGS);
264 if (dirp == NULL)
270 for (dp = readdir(dirp); dp != NULL; dp = readdir(dirp)){
303 closedir(dirp);

Completed in 511 milliseconds

12345