projects
/
unix-history
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Eliminated the "physstrat" wart and merged it into kern_physio.c. This
[unix-history]
/
sys
/
kern
/
kern_descrip.c
diff --git
a/sys/kern/kern_descrip.c
b/sys/kern/kern_descrip.c
index
9a92ffb
..
8c731f9
100644
(file)
--- a/
sys/kern/kern_descrip.c
+++ b/
sys/kern/kern_descrip.c
@@
-30,9
+30,9
@@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * @(#)kern_descrip.c 7.28 (Berkeley) 6/25/91
+ * from: @(#)kern_descrip.c 7.28 (Berkeley) 6/25/91
+ * $Id: kern_descrip.c,v 1.6 1993/12/19 00:51:22 wollman Exp $
*/
*/
-static char rcsid[] = "$Header: /a/cvs/386BSD/src/sys.386bsd/kern/kern_descrip.c,v 1.2 1993/06/29 13:57:17 nate Exp $";
#include "param.h"
#include "systm.h"
#include "param.h"
#include "systm.h"
@@
-50,6
+50,8
@@
static char rcsid[] = "$Header: /a/cvs/386BSD/src/sys.386bsd/kern/kern_descrip.c
#include "syslog.h"
#include "resourcevar.h"
#include "syslog.h"
#include "resourcevar.h"
+#include "vm/vm_user.h"
+
/*
* Descriptor management.
*/
/*
* Descriptor management.
*/
@@
-61,6
+63,7
@@
extern int maxfdescs; /* maximum number of file descriptors to a process */
* System calls on descriptors.
*/
/* ARGSUSED */
* System calls on descriptors.
*/
/* ARGSUSED */
+int
getdtablesize(p, uap, retval)
struct proc *p;
struct args *uap;
getdtablesize(p, uap, retval)
struct proc *p;
struct args *uap;
@@
-80,6
+83,7
@@
struct dup_args {
};
/* ARGSUSED */
};
/* ARGSUSED */
+int
dup(p, uap, retval)
struct proc *p;
struct dup_args *uap;
dup(p, uap, retval)
struct proc *p;
struct dup_args *uap;
@@
-89,10
+93,12
@@
dup(p, uap, retval)
struct file *fp;
int fd, error;
struct file *fp;
int fd, error;
+#if 0
/*
* XXX Compatibility
*/
if (uap->i &~ 077) { uap->i &= 077; return (dup2(p, uap, retval)); }
/*
* XXX Compatibility
*/
if (uap->i &~ 077) { uap->i &= 077; return (dup2(p, uap, retval)); }
+#endif
if ((unsigned)uap->i >= fdp->fd_nfiles ||
(fp = fdp->fd_ofiles[uap->i]) == NULL)
if ((unsigned)uap->i >= fdp->fd_nfiles ||
(fp = fdp->fd_ofiles[uap->i]) == NULL)
@@
-118,6
+124,7
@@
struct dup2_args {
};
/* ARGSUSED */
};
/* ARGSUSED */
+int
dup2(p, uap, retval)
struct proc *p;
struct dup2_args *uap;
dup2(p, uap, retval)
struct proc *p;
struct dup2_args *uap;
@@
-168,6
+175,7
@@
struct fcntl_args {
};
/* ARGSUSED */
};
/* ARGSUSED */
+int
fcntl(p, uap, retval)
struct proc *p;
register struct fcntl_args *uap;
fcntl(p, uap, retval)
struct proc *p;
register struct fcntl_args *uap;
@@
-317,6
+325,7
@@
struct close_args {
int fd;
};
int fd;
};
+int
close(p, uap, retval)
struct proc *p;
struct close_args *uap;
close(p, uap, retval)
struct proc *p;
struct close_args *uap;
@@
-352,6
+361,7
@@
struct fstat_args {
};
/* ARGSUSED */
};
/* ARGSUSED */
+int
fstat(p, uap, retval)
struct proc *p;
register struct fstat_args *uap;
fstat(p, uap, retval)
struct proc *p;
register struct fstat_args *uap;
@@
-389,6
+399,7
@@
fstat(p, uap, retval)
*/
int fdexpand;
*/
int fdexpand;
+int
fdalloc(p, want, result)
struct proc *p;
int want;
fdalloc(p, want, result)
struct proc *p;
int want;
@@
-457,6
+468,7
@@
fdalloc(p, want, result)
* Check to see whether n user file descriptors
* are available to the process p.
*/
* Check to see whether n user file descriptors
* are available to the process p.
*/
+int
fdavail(p, n)
struct proc *p;
register int n;
fdavail(p, n)
struct proc *p;
register int n;
@@
-479,6
+491,7
@@
fdavail(p, n)
* Create a new open file structure and allocate
* a file decriptor for the process that refers to it.
*/
* Create a new open file structure and allocate
* a file decriptor for the process that refers to it.
*/
+int
falloc(p, resultfp, resultfd)
register struct proc *p;
struct file **resultfp;
falloc(p, resultfp, resultfd)
register struct proc *p;
struct file **resultfp;
@@
-526,6
+539,7
@@
falloc(p, resultfp, resultfd)
/*
* Free a file descriptor.
*/
/*
* Free a file descriptor.
*/
+void
ffree(fp)
register struct file *fp;
{
ffree(fp)
register struct file *fp;
{
@@
-659,6
+673,7
@@
fdcloseexec(p)
* Internal form of close.
* Decrement reference count on file structure.
*/
* Internal form of close.
* Decrement reference count on file structure.
*/
+int
closef(fp, p)
register struct file *fp;
register struct proc *p;
closef(fp, p)
register struct file *fp;
register struct proc *p;
@@
-713,6
+728,7
@@
struct flock_args {
};
/* ARGSUSED */
};
/* ARGSUSED */
+int
flock(p, uap, retval)
struct proc *p;
register struct flock_args *uap;
flock(p, uap, retval)
struct proc *p;
register struct flock_args *uap;
@@
-759,6
+775,7
@@
flock(p, uap, retval)
* references to this file will be direct to the other driver.
*/
/* ARGSUSED */
* references to this file will be direct to the other driver.
*/
/* ARGSUSED */
+int
fdopen(dev, mode, type)
dev_t dev;
int mode, type;
fdopen(dev, mode, type)
dev_t dev;
int mode, type;
@@
-779,6
+796,7
@@
fdopen(dev, mode, type)
/*
* Duplicate the specified descriptor to a free descriptor.
*/
/*
* Duplicate the specified descriptor to a free descriptor.
*/
+int
dupfdopen(fdp, indx, dfd, mode)
register struct filedesc *fdp;
register int indx, dfd;
dupfdopen(fdp, indx, dfd, mode)
register struct filedesc *fdp;
register int indx, dfd;