summaryrefslogtreecommitdiff
path: root/usr/src
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src')
-rw-r--r--usr/src/cmd/sgs/elfdump/common/gen_struct_layout.c27
-rw-r--r--usr/src/cmd/sgs/elfdump/common/struct_layout_amd64.c6
-rw-r--r--usr/src/cmd/sgs/elfdump/common/struct_layout_i386.c32
-rw-r--r--usr/src/cmd/sgs/elfdump/common/struct_layout_sparc.c4
-rw-r--r--usr/src/cmd/sgs/elfdump/common/struct_layout_sparcv9.c4
5 files changed, 50 insertions, 23 deletions
diff --git a/usr/src/cmd/sgs/elfdump/common/gen_struct_layout.c b/usr/src/cmd/sgs/elfdump/common/gen_struct_layout.c
index aece7d593c..dba807dcd6 100644
--- a/usr/src/cmd/sgs/elfdump/common/gen_struct_layout.c
+++ b/usr/src/cmd/sgs/elfdump/common/gen_struct_layout.c
@@ -23,8 +23,6 @@
* Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#include <stdlib.h>
#include <stddef.h>
@@ -556,6 +554,29 @@ gen_utsname(void)
END;
}
+static void
+gen_prfdinfo(void)
+{
+ START(prfdinfo, prfdinfo_t);
+
+ SCALAR_FIELD(prfdinfo_t, pr_fd, 0);
+ SCALAR_FIELD(prfdinfo_t, pr_mode, 0);
+ SCALAR_FIELD(prfdinfo_t, pr_uid, 0);
+ SCALAR_FIELD(prfdinfo_t, pr_gid, 0);
+ SCALAR_FIELD(prfdinfo_t, pr_major, 0);
+ SCALAR_FIELD(prfdinfo_t, pr_minor, 0);
+ SCALAR_FIELD(prfdinfo_t, pr_rmajor, 0);
+ SCALAR_FIELD(prfdinfo_t, pr_rminor, 0);
+ SCALAR_FIELD(prfdinfo_t, pr_ino, 0);
+ SCALAR_FIELD(prfdinfo_t, pr_offset, 0);
+ SCALAR_FIELD(prfdinfo_t, pr_size, 0);
+ SCALAR_FIELD(prfdinfo_t, pr_fileflags, 0);
+ SCALAR_FIELD(prfdinfo_t, pr_fdflags, 0);
+ ARRAY_FIELD(prfdinfo_t, pr_path, 0);
+
+ END;
+}
+
/*ARGSUSED*/
int
@@ -584,6 +605,7 @@ main(int argc, char *argv[])
gen_sysset();
gen_timestruc();
gen_utsname();
+ gen_prfdinfo();
/*
@@ -611,6 +633,7 @@ main(int argc, char *argv[])
(void) printf(fmt, "sysset");
(void) printf(fmt, "timestruc");
(void) printf(fmt, "utsname");
+ (void) printf(fmt, "prfdinfo");
(void) printf("};\n");
/*
diff --git a/usr/src/cmd/sgs/elfdump/common/struct_layout_amd64.c b/usr/src/cmd/sgs/elfdump/common/struct_layout_amd64.c
index e23de0589b..3ddda2ef08 100644
--- a/usr/src/cmd/sgs/elfdump/common/struct_layout_amd64.c
+++ b/usr/src/cmd/sgs/elfdump/common/struct_layout_amd64.c
@@ -371,12 +371,14 @@ static const sl_prfdinfo_layout_t prfdinfo_layout = {
{ 32, 8, 0, 0 }, /* pr_ino */
{ 40, 8, 0, 0 }, /* pr_offset */
{ 48, 8, 0, 0 }, /* pr_size */
- { 56, 4, 0, 0 }, /* pr_filefags */
+ { 56, 4, 0, 0 }, /* pr_fileflags */
{ 60, 4, 0, 0 }, /* pr_fdflags */
- { 64, 1, 1024, 0 }, /* pr_path */
+ { 64, 1, 1024, 0 }, /* pr_path[] */
};
+
+
static const sl_arch_layout_t layout_amd64 = {
&auxv_layout,
&fltset_layout,
diff --git a/usr/src/cmd/sgs/elfdump/common/struct_layout_i386.c b/usr/src/cmd/sgs/elfdump/common/struct_layout_i386.c
index 1273eec8db..591b6c5439 100644
--- a/usr/src/cmd/sgs/elfdump/common/struct_layout_i386.c
+++ b/usr/src/cmd/sgs/elfdump/common/struct_layout_i386.c
@@ -359,24 +359,26 @@ static const sl_utsname_layout_t utsname_layout = {
static const sl_prfdinfo_layout_t prfdinfo_layout = {
- { 0, 1088, 0, 0 }, /* sizeof (prfdinfo_t) */
- { 0, 4, 0, 0 }, /* pr_fd */
- { 4, 4, 0, 0 }, /* pr_mode */
- { 8, 4, 0, 0 }, /* pr_uid */
- { 12, 4, 0, 0 }, /* pr_gid */
- { 16, 4, 0, 0 }, /* pr_major */
- { 20, 4, 0, 0 }, /* pr_minor */
- { 24, 4, 0, 0 }, /* pr_rmajor */
- { 28, 4, 0, 0 }, /* pr_rminor */
- { 32, 8, 0, 0 }, /* pr_ino */
- { 40, 8, 0, 0 }, /* pr_offset */
- { 48, 8, 0, 0 }, /* pr_size */
- { 56, 4, 0, 0 }, /* pr_filefags */
- { 60, 4, 0, 0 }, /* pr_fdflags */
- { 64, 1, 1024, 0 }, /* pr_path */
+ { 0, 1088, 0, 0 }, /* sizeof (prfdinfo_t) */
+ { 0, 4, 0, 0 }, /* pr_fd */
+ { 4, 4, 0, 0 }, /* pr_mode */
+ { 8, 4, 0, 0 }, /* pr_uid */
+ { 12, 4, 0, 0 }, /* pr_gid */
+ { 16, 4, 0, 0 }, /* pr_major */
+ { 20, 4, 0, 0 }, /* pr_minor */
+ { 24, 4, 0, 0 }, /* pr_rmajor */
+ { 28, 4, 0, 0 }, /* pr_rminor */
+ { 32, 8, 0, 0 }, /* pr_ino */
+ { 40, 8, 0, 0 }, /* pr_offset */
+ { 48, 8, 0, 0 }, /* pr_size */
+ { 56, 4, 0, 0 }, /* pr_fileflags */
+ { 60, 4, 0, 0 }, /* pr_fdflags */
+ { 64, 1, 1024, 0 }, /* pr_path[] */
};
+
+
static const sl_arch_layout_t layout_i386 = {
&auxv_layout,
&fltset_layout,
diff --git a/usr/src/cmd/sgs/elfdump/common/struct_layout_sparc.c b/usr/src/cmd/sgs/elfdump/common/struct_layout_sparc.c
index c1a05a3a63..3300a00035 100644
--- a/usr/src/cmd/sgs/elfdump/common/struct_layout_sparc.c
+++ b/usr/src/cmd/sgs/elfdump/common/struct_layout_sparc.c
@@ -370,9 +370,9 @@ static const sl_prfdinfo_layout_t prfdinfo_layout = {
{ 32, 8, 0, 0 }, /* pr_ino */
{ 40, 8, 0, 0 }, /* pr_offset */
{ 48, 8, 0, 0 }, /* pr_size */
- { 56, 4, 0, 0 }, /* pr_filefags */
+ { 56, 4, 0, 0 }, /* pr_fileflags */
{ 60, 4, 0, 0 }, /* pr_fdflags */
- { 64, 1, 1024, 0 }, /* pr_path */
+ { 64, 1, 1024, 0 }, /* pr_path[] */
};
diff --git a/usr/src/cmd/sgs/elfdump/common/struct_layout_sparcv9.c b/usr/src/cmd/sgs/elfdump/common/struct_layout_sparcv9.c
index cf61ab9f81..d416e47b82 100644
--- a/usr/src/cmd/sgs/elfdump/common/struct_layout_sparcv9.c
+++ b/usr/src/cmd/sgs/elfdump/common/struct_layout_sparcv9.c
@@ -371,9 +371,9 @@ static const sl_prfdinfo_layout_t prfdinfo_layout = {
{ 32, 8, 0, 0 }, /* pr_ino */
{ 40, 8, 0, 0 }, /* pr_offset */
{ 48, 8, 0, 0 }, /* pr_size */
- { 56, 4, 0, 0 }, /* pr_filefags */
+ { 56, 4, 0, 0 }, /* pr_fileflags */
{ 60, 4, 0, 0 }, /* pr_fdflags */
- { 64, 1, 1024, 0 }, /* pr_path */
+ { 64, 1, 1024, 0 }, /* pr_path[] */
};