Bug 146047

Summary: [kld] [patch] the kldstat(2) manual needs to be more precise about the purpose of kld_file_stat.size
Product: Documentation Reporter: Alexander Best <alexbestms>
Component: Books & ArticlesAssignee: Glen Barber <gjb>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff
none
kldstat.2.diff none

Description Alexander Best 2010-04-25 20:40:02 UTC
the kldstat(2) manual states that kld_file_stat.size contains "the size of the file". what kld_file_stat.size actually contains is the amount of memory taken up by the file.

Fix: apply the attached patch.

Patch attached with submission follows:
Comment 1 Alexander Best freebsd_committer freebsd_triage 2011-04-22 01:00:57 UTC
here's a revised patch.

-- 
a13x
Comment 2 Alexander Best freebsd_committer freebsd_triage 2011-04-22 01:01:19 UTC
Responsible Changed
From-To: freebsd-doc->gjb

Hi Glen, 

any chance you could commit the following patch?
Comment 3 Glen Barber freebsd_committer freebsd_triage 2011-04-22 01:11:00 UTC
Hi Alex,

Yep, I'll make sure this one doesn't have an anniversary.

-- 
Glen Barber | gjb@FreeBSD.org
FreeBSD Documentation Project
Comment 4 dfilter service freebsd_committer freebsd_triage 2011-04-23 22:00:36 UTC
Author: gjb (doc committer)
Date: Sat Apr 23 20:59:58 2011
New Revision: 220975
URL: http://svn.freebsd.org/changeset/base/220975

Log:
  - Clarification on kld_file_stat.size
  - While here, remove a few C comments that don't seem to contribute
    anything additional to the man page.
  
  PR:		146047
  Submitted by:	arundel
  MFC after:	3 days

Modified:
  head/lib/libc/sys/kldstat.2

Modified: head/lib/libc/sys/kldstat.2
==============================================================================
--- head/lib/libc/sys/kldstat.2	Sat Apr 23 17:37:14 2011	(r220974)
+++ head/lib/libc/sys/kldstat.2	Sat Apr 23 20:59:58 2011	(r220975)
@@ -25,7 +25,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd March 3, 1999
+.Dd April 23, 2011
 .Dt KLDSTAT 2
 .Os
 .Sh NAME
@@ -51,8 +51,8 @@ struct kld_file_stat {
 	char        name[MAXPATHLEN];
 	int         refs;
 	int         id;
-	caddr_t     address;        /* load address */
-	size_t      size;           /* size in bytes */
+	caddr_t     address;
+	size_t      size;
 	char        pathname[MAXPATHLEN];
 };
 .Ed
@@ -76,7 +76,7 @@ The id of the file specified in
 .It address
 The load address of the kld file.
 .It size
-The size of the file.
+The amount of memory in bytes allocated by the file.
 .It pathname
 The full name of the file referred to by
 .Fa fileid ,
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
Comment 5 Glen Barber freebsd_committer freebsd_triage 2011-04-23 22:00:37 UTC
State Changed
From-To: open->patched

Patched in HEAD.  MFC in 3 days.
Comment 6 dfilter service freebsd_committer freebsd_triage 2011-04-26 14:09:38 UTC
Author: gjb (doc committer)
Date: Tue Apr 26 13:09:19 2011
New Revision: 221064
URL: http://svn.freebsd.org/changeset/base/221064

Log:
  MFC 220975:
  - Clarification on kld_file_stat.size
  - While here, remove a few C comments that don't seem to contribute
    anything additional to the man page.
  
  PR:		146047

Modified:
  stable/8/lib/libc/sys/kldstat.2
Directory Properties:
  stable/8/lib/libc/   (props changed)
  stable/8/lib/libc/stdtime/   (props changed)

Modified: stable/8/lib/libc/sys/kldstat.2
==============================================================================
--- stable/8/lib/libc/sys/kldstat.2	Tue Apr 26 12:50:26 2011	(r221063)
+++ stable/8/lib/libc/sys/kldstat.2	Tue Apr 26 13:09:19 2011	(r221064)
@@ -25,7 +25,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd March 3, 1999
+.Dd April 23, 2011
 .Dt KLDSTAT 2
 .Os
 .Sh NAME
@@ -51,8 +51,8 @@ struct kld_file_stat {
 	char        name[MAXPATHLEN];
 	int         refs;
 	int         id;
-	caddr_t     address;        /* load address */
-	size_t      size;           /* size in bytes */
+	caddr_t     address;
+	size_t      size;
 	char        pathname[MAXPATHLEN];
 };
 .Ed
@@ -77,7 +77,7 @@ The id of the file specified in
 .It address
 The load address of the kld file.
 .It size
-The size of the file.
+The amount of memory in bytes allocated by the file.
 .It pathname
 The full name of the file referred to by
 .Fa fileid ,
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
Comment 7 dfilter service freebsd_committer freebsd_triage 2011-04-26 14:10:18 UTC
Author: gjb (doc committer)
Date: Tue Apr 26 13:09:54 2011
New Revision: 221065
URL: http://svn.freebsd.org/changeset/base/221065

Log:
  MFC 220975:
  - Clarification on kld_file_stat.size
  - While here, remove a few C comments that don't seem to contribute
    anything additional to the man page.
  
  PR:		146047

Modified:
  stable/7/lib/libc/sys/kldstat.2
Directory Properties:
  stable/7/lib/libc/   (props changed)
  stable/7/lib/libc/stdtime/   (props changed)

Modified: stable/7/lib/libc/sys/kldstat.2
==============================================================================
--- stable/7/lib/libc/sys/kldstat.2	Tue Apr 26 13:09:19 2011	(r221064)
+++ stable/7/lib/libc/sys/kldstat.2	Tue Apr 26 13:09:54 2011	(r221065)
@@ -25,7 +25,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd March 3, 1999
+.Dd April 23, 2011
 .Dt KLDSTAT 2
 .Os
 .Sh NAME
@@ -51,8 +51,8 @@ struct kld_file_stat {
 	char        name[MAXPATHLEN];
 	int         refs;
 	int         id;
-	caddr_t     address;        /* load address */
-	size_t      size;           /* size in bytes */
+	caddr_t     address;
+	size_t      size;
 };
 .Ed
 .Pp
@@ -76,7 +76,7 @@ The id of the file specified in
 .It address
 The load address of the kld file.
 .It size
-The size of the file.
+The amount of memory in bytes allocated by the file.
 .El
 .Sh RETURN VALUES
 .Rv -std kldstat
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
Comment 8 Glen Barber freebsd_committer freebsd_triage 2011-04-26 14:10:50 UTC
State Changed
From-To: patched->closed

MFCd to stable/8 and stable/7.  Thanks!