diff options
Diffstat (limited to 'usr/src/uts/common/sys')
| -rw-r--r-- | usr/src/uts/common/sys/acct.h | 21 | ||||
| -rw-r--r-- | usr/src/uts/common/sys/fcntl.h | 15 | ||||
| -rw-r--r-- | usr/src/uts/common/sys/file.h | 23 | ||||
| -rw-r--r-- | usr/src/uts/common/sys/pathname.h | 16 | ||||
| -rw-r--r-- | usr/src/uts/common/sys/stat.h | 15 | ||||
| -rw-r--r-- | usr/src/uts/common/sys/syscall.h | 9 | ||||
| -rw-r--r-- | usr/src/uts/common/sys/vnode.h | 5 |
7 files changed, 58 insertions, 46 deletions
diff --git a/usr/src/uts/common/sys/acct.h b/usr/src/uts/common/sys/acct.h index 7853af96f0..e8903bd0da 100644 --- a/usr/src/uts/common/sys/acct.h +++ b/usr/src/uts/common/sys/acct.h @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,20 +18,17 @@ * * CDDL HEADER END */ -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - /* - * Copyright 2003 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved. */ +/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ +/* All Rights Reserved */ + #ifndef _SYS_ACCT_H #define _SYS_ACCT_H -#pragma ident "%Z%%M% %I% %E% SMI" - #include <sys/types.h> #include <sys/types32.h> @@ -104,11 +100,6 @@ int acct_fs_in_use(struct vnode *); #define AFORK 0001 /* has executed fork, but no exec */ #define ASU 0002 /* used super-user privileges */ -#ifdef SUN_SRC_COMPAT -#define ACOMPAT 0004 /* used compatibility mode (VAX) */ -#define ACORE 0010 /* dumped core */ -#define AXSIG 0020 /* killed by a signal */ -#endif /* SUN_SRC_COMPAT */ #define AEXPND 0040 /* expanded acct structure */ #define ACCTF 0300 /* record type: 00 = acct */ diff --git a/usr/src/uts/common/sys/fcntl.h b/usr/src/uts/common/sys/fcntl.h index 9057a671a6..a0c4191b1c 100644 --- a/usr/src/uts/common/sys/fcntl.h +++ b/usr/src/uts/common/sys/fcntl.h @@ -20,8 +20,7 @@ */ /* - * Copyright 2009 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved. */ /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ @@ -50,11 +49,13 @@ extern "C" { /* * Flag values accessible to open(2) and fcntl(2) - * (the first three can only be set by open(2)). + * The first five can only be set (exclusively) by open(2). */ #define O_RDONLY 0 #define O_WRONLY 1 #define O_RDWR 2 +#define O_SEARCH 0x200000 +#define O_EXEC 0x400000 #if defined(__EXTENSIONS__) || !defined(_POSIX_C_SOURCE) #define O_NDELAY 0x04 /* non-blocking I/O */ #endif /* defined(__EXTENSIONS__) || !defined(_POSIX_C_SOURCE) */ @@ -67,9 +68,6 @@ extern "C" { /* defines read/write file integrity */ #endif /* defined(__EXTENSIONS__) || !defined(_POSIX_C_SOURCE) ... */ #define O_NONBLOCK 0x80 /* non-blocking I/O (POSIX) */ -#ifdef SUN_SRC_COMPAT -#define O_PRIV 0x1000 /* Private access to file */ -#endif /* SUN_SRC_COMPAT */ #ifdef _LARGEFILE_SOURCE #define O_LARGEFILE 0x2000 #endif @@ -300,7 +298,8 @@ typedef struct o_flock { * POSIX constants */ -#define O_ACCMODE 3 /* Mask for file access modes */ +/* Mask for file access modes */ +#define O_ACCMODE (O_SEARCH | O_EXEC | 0x3) #define FD_CLOEXEC 1 /* close on exec flag */ /* @@ -345,8 +344,10 @@ typedef struct fshare { */ #if !defined(__XOPEN_OR_POSIX) || defined(_ATFILE_SOURCE) || \ defined(__EXTENSIONS__) + /* || defined(_XPG7) */ #define AT_FDCWD 0xffd19553 #define AT_SYMLINK_NOFOLLOW 0x1000 +#define AT_SYMLINK_FOLLOW 0x2000 /* only for linkat() */ #define AT_REMOVEDIR 0x1 #define _AT_TRIGGER 0x2 #define AT_EACCESS 0x4 /* use EUID/EGID for access */ diff --git a/usr/src/uts/common/sys/file.h b/usr/src/uts/common/sys/file.h index 494840aff8..f402bc7079 100644 --- a/usr/src/uts/common/sys/file.h +++ b/usr/src/uts/common/sys/file.h @@ -18,20 +18,17 @@ * * CDDL HEADER END */ -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - /* - * Copyright 2007 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved. */ +/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ +/* All Rights Reserved */ + #ifndef _SYS_FILE_H #define _SYS_FILE_H -#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 11.28 */ - #include <sys/t_lock.h> #ifdef _KERNEL #include <sys/model.h> @@ -61,7 +58,7 @@ extern "C" { typedef struct file { kmutex_t f_tlock; /* short term lock */ ushort_t f_flag; - ushort_t f_pad; /* Explicit pad to 4 byte boundary */ + ushort_t f_flag2; /* extra flags (FSEARCH, FEXEC) */ struct vnode *f_vnode; /* pointer to vnode structure */ offset_t f_offset; /* read/write character pointer */ struct cred *f_cred; /* credentials of user who opened it */ @@ -77,7 +74,7 @@ typedef struct fpollinfo { struct fpollinfo *fp_next; } fpollinfo_t; -/* flags */ +/* f_flag */ #define FOPEN 0xffffffff #define FREAD 0x01 /* <sys/aiocb.h> LIO_READ must be identical */ @@ -111,6 +108,11 @@ typedef struct fpollinfo { #define FIGNORECASE 0x80000 /* request case-insensitive lookups */ #define FXATTRDIROPEN 0x100000 /* only opening hidden attribute directory */ +/* f_flag2 (open-only) */ + +#define FSEARCH 0x200000 /* O_SEARCH = 0x200000 */ +#define FEXEC 0x400000 /* O_EXEC = 0x400000 */ + #ifdef _KERNEL /* @@ -170,6 +172,7 @@ typedef struct fpollinfo { */ struct proc; /* forward reference for function prototype */ struct vnodeops; +struct vattr; extern file_t *getf(int); extern void releasef(int); @@ -199,6 +202,8 @@ extern void close_exec(uf_info_t *); extern void clear_stale_fd(void); extern void clear_active_fd(int); extern void free_afd(afd_t *afd); +extern int fgetstartvp(int, char *, struct vnode **); +extern int fsetattrat(int, char *, int, struct vattr *); extern int fisopen(struct vnode *); extern void delfpollinfo(int); extern void addfpollinfo(int); diff --git a/usr/src/uts/common/sys/pathname.h b/usr/src/uts/common/sys/pathname.h index 305e3cf09c..db978c1ea9 100644 --- a/usr/src/uts/common/sys/pathname.h +++ b/usr/src/uts/common/sys/pathname.h @@ -18,9 +18,9 @@ * * CDDL HEADER END */ + /* - * Copyright 2009 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved. */ /* Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T */ @@ -80,17 +80,17 @@ extern int pn_fixslash(struct pathname *); extern int pn_addslash(struct pathname *); extern void pn_free(struct pathname *); -extern int lookupname(char *, enum uio_seg, enum symfollow, +extern int lookupname(char *, enum uio_seg, int follow, vnode_t **, vnode_t **); -extern int lookupnameat(char *, enum uio_seg, enum symfollow, +extern int lookupnameat(char *, enum uio_seg, int follow, vnode_t **, vnode_t **, vnode_t *); -extern int lookupnameatcred(char *, enum uio_seg, enum symfollow, +extern int lookupnameatcred(char *, enum uio_seg, int follow, vnode_t **, vnode_t **, vnode_t *, cred_t *); -extern int lookuppn(struct pathname *, struct pathname *, enum symfollow, +extern int lookuppn(struct pathname *, struct pathname *, int follow, vnode_t **, vnode_t **); -extern int lookuppnat(struct pathname *, struct pathname *, enum symfollow, +extern int lookuppnat(struct pathname *, struct pathname *, int follow, vnode_t **, vnode_t **, vnode_t *); -extern int lookuppnatcred(struct pathname *, struct pathname *, enum symfollow, +extern int lookuppnatcred(struct pathname *, struct pathname *, int follow, vnode_t **, vnode_t **, vnode_t *, cred_t *); extern int lookuppnvp(struct pathname *, struct pathname *, int follow, diff --git a/usr/src/uts/common/sys/stat.h b/usr/src/uts/common/sys/stat.h index 81fb9e4ab8..3f68a55730 100644 --- a/usr/src/uts/common/sys/stat.h +++ b/usr/src/uts/common/sys/stat.h @@ -20,8 +20,7 @@ */ /* - * Copyright 2009 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. */ /* Copyright (c) 1990, 1991 UNIX System Laboratories, Inc. */ @@ -505,9 +504,13 @@ extern int fstatat64(int, const char *, struct stat64 *, int); #endif /* defined (_ATFILE_SOURCE) */ #endif -#if defined(__EXTENSIONS__) || \ +#if defined(__EXTENSIONS__) || defined(_ATFILE_SOURCE) || \ (!defined(_STRICT_STDC) && !defined(__XOPEN_OR_POSIX)) /* || defined(_XPG7) */ +extern int mkdirat(int, const char *, mode_t); +extern int mkfifoat(int, const char *, mode_t); +extern int mknodat(int, const char *, mode_t, dev_t); +extern int fchmodat(int, const char *, mode_t, int); extern int futimens(int, const struct timespec[2]); extern int utimensat(int, const char *, const struct timespec[2], int); #endif /* defined(__EXTENSIONS__) ... */ @@ -536,9 +539,13 @@ extern int fstatat64(); #endif /* defined (_ATFILE_SOURCE) */ #endif -#if defined(__EXTENSIONS__) || \ +#if defined(__EXTENSIONS__) || defined(_ATFILE_SOURCE) || \ (!defined(_STRICT_STDC) && !defined(__XOPEN_OR_POSIX)) /* || defined(_XPG7) */ +extern int mkdirat(); +extern int mkfifoat(); +extern int mknodat(); +extern int fchmodat(); extern int futimens(); extern int utimensat(); #endif /* defined(__EXTENSIONS__) ... */ diff --git a/usr/src/uts/common/sys/syscall.h b/usr/src/uts/common/sys/syscall.h index 170483de8d..633bfef143 100644 --- a/usr/src/uts/common/sys/syscall.h +++ b/usr/src/uts/common/sys/syscall.h @@ -20,8 +20,7 @@ */ /* - * Copyright 2010 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved. */ /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ @@ -53,8 +52,10 @@ extern "C" { #define SYS_write 4 #define SYS_open 5 #define SYS_close 6 +#define SYS_linkat 7 #define SYS_link 9 #define SYS_unlink 10 +#define SYS_symlinkat 11 #define SYS_chdir 12 #define SYS_time 13 #define SYS_mknod 14 @@ -65,6 +66,7 @@ extern "C" { #define SYS_lseek 19 #define SYS_getpid 20 #define SYS_mount 21 +#define SYS_readlinkat 22 #define SYS_setuid 23 #define SYS_getuid 24 #define SYS_stime 25 @@ -97,6 +99,7 @@ extern "C" { #define SYS_faccessat 45 #define SYS_setgid 46 #define SYS_getgid 47 +#define SYS_mknodat 48 #define SYS_msgsys 49 /* * subcodes: @@ -260,6 +263,8 @@ extern "C" { * getcontext(...) :: syscall(100, 0, ...) * setcontext(...) :: syscall(100, 1, ...) */ +#define SYS_fchmodat 101 +#define SYS_mkdirat 102 #define SYS_statvfs 103 #define SYS_fstatvfs 104 #define SYS_getloadavg 105 diff --git a/usr/src/uts/common/sys/vnode.h b/usr/src/uts/common/sys/vnode.h index 1fbcb29005..b34eb6b4ff 100644 --- a/usr/src/uts/common/sys/vnode.h +++ b/usr/src/uts/common/sys/vnode.h @@ -18,6 +18,7 @@ * * CDDL HEADER END */ + /* * Copyright (c) 1988, 2010, Oracle and/or its affiliates. All rights reserved. */ @@ -1159,7 +1160,7 @@ extern int fop_retzcbuf(vnode_t *, xuio_t *, cred_t *, caller_context_t *); /* * Flags for VOP_LOOKUP * - * Defined in file.h, but also possible, FIGNORECASE + * Defined in file.h, but also possible, FIGNORECASE and FSEARCH * */ #define LOOKUP_DIR 0x01 /* want parent dir vp */ @@ -1244,6 +1245,8 @@ void vn_rele_async(struct vnode *vp, struct taskq *taskq); void vn_rele_dnlc(struct vnode *vp); void vn_rele_stream(struct vnode *vp); int vn_link(char *from, char *to, enum uio_seg seg); +int vn_linkat(vnode_t *fstartvp, char *from, enum symfollow follow, + vnode_t *tstartvp, char *to, enum uio_seg seg); int vn_rename(char *from, char *to, enum uio_seg seg); int vn_renameat(vnode_t *fdvp, char *fname, vnode_t *tdvp, char *tname, enum uio_seg seg); |
