diff options
author | Garrett D'Amore <garrett@damore.org> | 2012-11-02 09:48:42 -0700 |
---|---|---|
committer | Garrett D'Amore <garrett@damore.org> | 2012-11-02 09:48:42 -0700 |
commit | 34bdffbf3e3c188027e767e631f717b10159316d (patch) | |
tree | 4d4e8a7b31cd6528275774fd378cdc6ef52661b4 /usr/src/uts/common/sys/procfs.h | |
parent | 70087ad34e224a679eb83e405bf394606ba94c1c (diff) | |
download | illumos-joyent-34bdffbf3e3c188027e767e631f717b10159316d.tar.gz |
3294 pfiles postmortem support
Reviewed by: Robert Mustacchi <rm@joyent.com>
Reviewed by: Richard Lowe <richlowe@richlowe.net>
Approved by: Eric Schrock <eric.schrock@delphix.com>
Diffstat (limited to 'usr/src/uts/common/sys/procfs.h')
-rw-r--r-- | usr/src/uts/common/sys/procfs.h | 39 |
1 files changed, 37 insertions, 2 deletions
diff --git a/usr/src/uts/common/sys/procfs.h b/usr/src/uts/common/sys/procfs.h index b320836182..0c4a48fcdd 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> #if !defined(_LP64) && _FILE_OFFSET_BITS == 64 #error "Cannot use procfs in the large file compilation environment" @@ -492,6 +495,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 { |