Date: Wed, 24 Jun 2009 12:04:50 -0400 From: John Baldwin <jhb@freebsd.org> To: Ulf Lilleengen <lulf@freebsd.org> Cc: svn-src-projects@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r194847 - projects/libprocstat/sys/sys Message-ID: <200906241204.51117.jhb@freebsd.org> In-Reply-To: <200906241544.n5OFi43Q019124@svn.freebsd.org> References: <200906241544.n5OFi43Q019124@svn.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wednesday 24 June 2009 11:44:04 am Ulf Lilleengen wrote: > Author: lulf > Date: Wed Jun 24 15:44:04 2009 > New Revision: 194847 > URL: http://svn.freebsd.org/changeset/base/194847 > > Log: > - Change types to those used internally in the kernel. > - Add kf_status to be used for kinfo-specific flags. > > Modified: > projects/libprocstat/sys/sys/user.h > > Modified: projects/libprocstat/sys/sys/user.h > ============================================================================== > --- projects/libprocstat/sys/sys/user.h Wed Jun 24 15:41:21 2009 (r194846) > +++ projects/libprocstat/sys/sys/user.h Wed Jun 24 15:44:04 2009 (r194847) > @@ -312,6 +312,7 @@ struct kinfo_ofile { > > struct kinfo_file { > int kf_structsize; /* Variable size of record. */ > + uint16_t kf_status; /* Status flags. */ > int kf_type; /* Descriptor type. */ > int kf_fd; /* Array index. */ > int kf_ref_count; /* Reference count. */ > @@ -324,11 +325,11 @@ 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. */ > - 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. */ > + dev_t kf_file_fsid; /* Vnode filesystem id. */ > + uint64_t kf_file_fileid; /* Global file id. */ > + mode_t kf_file_mode; /* File mode. */ > + off_t kf_file_size; /* File size. */ > + dev_t kf_file_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. */ You probably don't want to add kf_status where you did as it disturbs the ABI of all the fields after it. New fields should be added in the spare region. Given that mode_t is 16-bits I would just stick it next to kf_file_mode. -- John Baldwin
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200906241204.51117.jhb>