diff options
author | alc <alc@FreeBSD.org> | 2004-01-11 06:59:21 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2004-01-11 06:59:21 +0000 |
commit | 5752042760d09cb610e99eba21ace91ccfade729 (patch) | |
tree | 0f91e54b4e905f16e2eb488d38b961a65f27d8bb | |
parent | bf3ace5acaa8f607b40f3c34044ebb974a8de294 (diff) | |
download | FreeBSD-src-5752042760d09cb610e99eba21ace91ccfade729.zip FreeBSD-src-5752042760d09cb610e99eba21ace91ccfade729.tar.gz |
Remove long dead code, specifically, code related to munmapfd().
(See also vm/vm_mmap.c revision 1.173.)
-rw-r--r-- | sys/kern/kern_descrip.c | 24 | ||||
-rw-r--r-- | sys/sys/filedesc.h | 3 | ||||
-rw-r--r-- | sys/vm/vm_extern.h | 1 |
3 files changed, 0 insertions, 28 deletions
diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c index 3b8227f..69e6837 100644 --- a/sys/kern/kern_descrip.c +++ b/sys/kern/kern_descrip.c @@ -535,10 +535,6 @@ do_dup(td, type, old, new, retval) holdleaders = 0; KASSERT(delfp == NULL || type == DUP_FIXED, ("dup() picked an open file")); -#if 0 - if (delfp && (fdp->fd_ofileflags[new] & UF_MAPPED)) - (void) munmapfd(td, new); -#endif /* * Duplicate the source descriptor, update lastfile @@ -830,10 +826,6 @@ close(td, uap) error = EBADF; goto done2; } -#if 0 - if (fdp->fd_ofileflags[fd] & UF_MAPPED) - (void) munmapfd(td, fd); -#endif fdp->fd_ofiles[fd] = NULL; fdp->fd_ofileflags[fd] = 0; if (td->td_proc->p_fdtol != NULL) { @@ -1587,10 +1579,6 @@ setugidsafety(td) if (fdp->fd_ofiles[i] && is_unsafe(fdp->fd_ofiles[i])) { struct file *fp; -#if 0 - if ((fdp->fd_ofileflags[i] & UF_MAPPED) != 0) - (void) munmapfd(td, i); -#endif if (i < fdp->fd_knlistsize) { FILEDESC_UNLOCK(fdp); knote_fdclose(td, i); @@ -1641,10 +1629,6 @@ fdcloseexec(td) (fdp->fd_ofileflags[i] & UF_EXCLOSE)) { struct file *fp; -#if 0 - if (fdp->fd_ofileflags[i] & UF_MAPPED) - (void) munmapfd(td, i); -#endif if (i < fdp->fd_knlistsize) { FILEDESC_UNLOCK(fdp); knote_fdclose(td, i); @@ -2177,10 +2161,6 @@ dupfdopen(td, fdp, indx, dfd, mode, error) return (EACCES); } fp = fdp->fd_ofiles[indx]; -#if 0 - if (fp && fdp->fd_ofileflags[indx] & UF_MAPPED) - (void) munmapfd(td, indx); -#endif fdp->fd_ofiles[indx] = wfp; fdp->fd_ofileflags[indx] = fdp->fd_ofileflags[dfd]; fhold_locked(wfp); @@ -2203,10 +2183,6 @@ dupfdopen(td, fdp, indx, dfd, mode, error) * Steal away the file pointer from dfd and stuff it into indx. */ fp = fdp->fd_ofiles[indx]; -#if 0 - if (fp && fdp->fd_ofileflags[indx] & UF_MAPPED) - (void) munmapfd(td, indx); -#endif fdp->fd_ofiles[indx] = fdp->fd_ofiles[dfd]; fdp->fd_ofiles[dfd] = NULL; fdp->fd_ofileflags[indx] = fdp->fd_ofileflags[dfd]; diff --git a/sys/sys/filedesc.h b/sys/sys/filedesc.h index f87663a..0e2b8de 100644 --- a/sys/sys/filedesc.h +++ b/sys/sys/filedesc.h @@ -118,9 +118,6 @@ struct filedesc_to_leader { * Per-process open flags. */ #define UF_EXCLOSE 0x01 /* auto-close on exec */ -#if 0 -#define UF_MAPPED 0x02 /* mapped from device */ -#endif /* * Storage required per open file descriptor. diff --git a/sys/vm/vm_extern.h b/sys/vm/vm_extern.h index 07f28fa..d713411 100644 --- a/sys/vm/vm_extern.h +++ b/sys/vm/vm_extern.h @@ -69,7 +69,6 @@ void kmem_free_wakeup(vm_map_t, vm_offset_t, vm_size_t); void kmem_init(vm_offset_t, vm_offset_t); vm_offset_t kmem_malloc(vm_map_t, vm_size_t, boolean_t); vm_map_t kmem_suballoc(vm_map_t, vm_offset_t *, vm_offset_t *, vm_size_t); -void munmapfd(struct thread *, int); void swapout_procs(int); int useracc(void *, int, int); int vm_fault(vm_map_t, vm_offset_t, vm_prot_t, int); |