diff options
Diffstat (limited to 'usr/src/uts/common/sys')
-rw-r--r-- | usr/src/uts/common/sys/elf.h | 6 | ||||
-rw-r--r-- | usr/src/uts/common/sys/ipmi.h | 4 | ||||
-rw-r--r-- | usr/src/uts/common/sys/procfs.h | 39 | ||||
-rw-r--r-- | usr/src/uts/common/sys/utsname.h | 48 |
4 files changed, 58 insertions, 39 deletions
diff --git a/usr/src/uts/common/sys/elf.h b/usr/src/uts/common/sys/elf.h index 6d66401259..bc25aee9c4 100644 --- a/usr/src/uts/common/sys/elf.h +++ b/usr/src/uts/common/sys/elf.h @@ -19,6 +19,9 @@ * CDDL HEADER END */ /* + * Copyright 2012 DEY Storage Systems, Inc. All rights reserved. + */ +/* * Copyright 2010 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -812,7 +815,8 @@ typedef Elf64_Word Elf64_Capchain; #define NT_PRPRIVINFO 19 /* priv_impl_info_t <sys/priv.h> */ #define NT_CONTENT 20 /* core_content_t <sys/corectl.h> */ #define NT_ZONENAME 21 /* string from getzonenamebyid(3C) */ -#define NT_NUM 21 +#define NT_FDINFO 22 /* open fd info */ +#define NT_NUM 22 #ifdef _KERNEL diff --git a/usr/src/uts/common/sys/ipmi.h b/usr/src/uts/common/sys/ipmi.h index 9dafac407d..94a53392de 100644 --- a/usr/src/uts/common/sys/ipmi.h +++ b/usr/src/uts/common/sys/ipmi.h @@ -42,8 +42,8 @@ extern "C" { #define IPMI_MAX_ADDR_SIZE 0x20 #define IPMI_MAX_RX 1024 -#define IPMI_BMC_SLAVE_ADDR 0x20 /* Linux Default slave address */ -#define IPMI_BMC_CHANNEL 0x0f /* Linux BMC channel */ +#define IPMI_BMC_SLAVE_ADDR 0x20 /* Default slave address */ +#define IPMI_BMC_CHANNEL 0x0f /* BMC channel */ #define IPMI_BMC_SMS_LUN 0x02 diff --git a/usr/src/uts/common/sys/procfs.h b/usr/src/uts/common/sys/procfs.h index 12a6925368..f592fd9dcf 100644 --- a/usr/src/uts/common/sys/procfs.h +++ b/usr/src/uts/common/sys/procfs.h @@ -23,12 +23,13 @@ * Copyright 2006 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ +/* + * Copyright 2012 DEY Storage Systems, Inc. All rights reserved. + */ #ifndef _SYS_PROCFS_H #define _SYS_PROCFS_H -#pragma ident "%Z%%M% %I% %E% SMI" - #ifdef __cplusplus extern "C" { #endif @@ -61,6 +62,8 @@ extern "C" { #include <sys/pset.h> #include <sys/procfs_isa.h> #include <sys/priv.h> +#include <sys/stat.h> +#include <sys/param.h> /* * System call interfaces for /proc. @@ -488,6 +491,38 @@ typedef struct prasmap { #define PG_HWMAPPED 0x04 /* page is present and mapped */ /* + * Open files. Only in core files (for now). Note that we'd like to use + * the stat or stat64 structure, but both of these structures are unfortunately + * not consistent between 32 and 64 bit modes. To keep our lives simpler, we + * just define our own structure with types that are not sensitive to this + * difference. Also, it turns out that pfiles omits a lot of info from the + * struct stat (e.g. times, device sizes, etc.) so we don't bother adding those + * here. + */ +typedef struct prfdinfo { + int pr_fd; + mode_t pr_mode; + + uid_t pr_uid; + gid_t pr_gid; + + major_t pr_major; /* think stat.st_dev */ + minor_t pr_minor; + + major_t pr_rmajor; /* think stat.st_rdev */ + minor_t pr_rminor; + + ino64_t pr_ino; + off64_t pr_offset; + off64_t pr_size; + + int pr_fileflags; /* fcntl(F_GETXFL), etc */ + int pr_fdflags; /* fcntl(F_GETFD), etc. */ + + char pr_path[MAXPATHLEN]; +} prfdinfo_t; + +/* * Header for /proc/<pid>/lstatus /proc/<pid>/lpsinfo /proc/<pid>/lusage */ typedef struct prheader { diff --git a/usr/src/uts/common/sys/utsname.h b/usr/src/uts/common/sys/utsname.h index 2b9cf0e33f..4a2aca442c 100644 --- a/usr/src/uts/common/sys/utsname.h +++ b/usr/src/uts/common/sys/utsname.h @@ -31,8 +31,6 @@ #ifndef _SYS_UTSNAME_H #define _SYS_UTSNAME_H -#pragma ident "%Z%%M% %I% %E% SMI" - #include <sys/feature_tests.h> #ifdef __cplusplus @@ -67,13 +65,9 @@ extern struct utsname utsname; #if defined(__STDC__) -#if !defined(__lint) -static int uname(struct utsname *); -static int _uname(struct utsname *); -#else extern int uname(struct utsname *); extern int _uname(struct utsname *); -#endif + #if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) extern int nuname(struct utsname *); #endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */ @@ -81,13 +75,9 @@ extern int _nuname(struct utsname *); #else /* defined(__STDC__) */ -#if !defined(__lint) -static int uname(); -static int _uname(); -#else extern int uname(); extern int _uname(); -#endif + #if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) extern int nuname(); #endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */ @@ -95,30 +85,20 @@ extern int _nuname(); #endif /* defined(__STDC__) */ - -#if !defined(__lint) -static int -#if defined(__STDC__) -_uname(struct utsname *_buf) -#else -_uname(_buf) -struct utsname *_buf; -#endif -{ - return (_nuname(_buf)); -} - -static int -#if defined(__STDC__) -uname(struct utsname *_buf) +/* + * On i386 in SVID.2 uname() returns a utsname structure with 8 byte members, + * and nuname() returns the real struct utsname. In SVID.3 uname and nuname + * are equivalent. Anyone who includes this header gets the SVID.3 behaviour. + * The SVID.2 behaviour exists solely for compatibility, and is what is + * implemented by the libc uname/_uname entrypoints. + */ +#ifdef __PRAGMA_REDEFINE_EXTNAME +#pragma redefine_extname uname _nuname +#pragma redefine_extname _uname _nuname #else -uname(_buf) -struct utsname *_buf; +#define uname _nuname +#define _uname _nuname #endif -{ - return (_nuname(_buf)); -} -#endif /* !defined(__lint) */ #else /* defined(__i386) */ |