Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 24 Jun 2009 15:00:45 +0000 (UTC)
From:      Ulf Lilleengen <lulf@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r194838 - projects/libprocstat/sys/sys
Message-ID:  <200906241500.n5OF0jTG017766@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: lulf
Date: Wed Jun 24 15:00:45 2009
New Revision: 194838
URL: http://svn.freebsd.org/changeset/base/194838

Log:
  - Use the spare fields instead of expanding the struct.
  - Use types with known size.

Modified:
  projects/libprocstat/sys/sys/user.h

Modified: projects/libprocstat/sys/sys/user.h
==============================================================================
--- projects/libprocstat/sys/sys/user.h	Wed Jun 24 14:49:26 2009	(r194837)
+++ projects/libprocstat/sys/sys/user.h	Wed Jun 24 15:00:45 2009	(r194838)
@@ -307,7 +307,7 @@ struct kinfo_ofile {
 };
 
 #if defined(__amd64__) || defined(__i386__)
-#define	KINFO_FILE_SIZE	1412
+#define	KINFO_FILE_SIZE	1392
 #endif
 
 struct kinfo_file {
@@ -324,12 +324,12 @@ struct kinfo_file {
 	int	kf_sock_protocol;		/* Socket protocol. */
 	struct sockaddr_storage kf_sa_local;	/* Socket address. */
 	struct sockaddr_storage	kf_sa_peer;	/* Peer address. */
-	long	kf_fsid;			/* Vnode filesystem id. */
-	long	kf_fileid;			/* Global file id. */
-	mode_t	kf_mode;			/* File mode. */
-	u_long	kf_size;			/* File size. */
-	dev_t	kf_rdev;			/* File device. */
-	int	_kf_ispare[16];			/* Space for more stuff. */
+	uint32_t	kf_fsid;		/* Vnode filesystem id. */
+	uint64_t	kf_fileid;		/* Global file id. */
+	uint32_t	kf_mode;		/* File mode. */
+	int64_t		kf_size;		/* File size. */
+	uint32_t	kf_rdev;		/* File device. */
+	int	_kf_ispare[9];			/* Space for more stuff. */
 	/* Truncated before copyout in sysctl */
 	char	kf_path[PATH_MAX];		/* Path to file, if any. */
 };



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200906241500.n5OF0jTG017766>