This is the mail archive of the libc-hacker@sourceware.cygnus.com mailing list for the glibc project.

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Another getsysstats bug



The type of the proc system is proc - but getsysstats was looking for
"/proc" instead.  Here's a fix.  Ok to commit?

Andreas

2000-07-06  Andreas Jaeger  <aj@suse.de>

	* sysdeps/unix/sysv/linux/getsysstats.c (get_proc_path): The type
	of the proc system is "proc".

============================================================
Index: sysdeps/unix/sysv/linux/getsysstats.c
--- sysdeps/unix/sysv/linux/getsysstats.c	2000/07/06 09:25:17	1.11
+++ sysdeps/unix/sysv/linux/getsysstats.c	2000/07/06 10:49:20
@@ -57,7 +57,7 @@
     {
       while ((entry = __getmntent_r (fp, &mount_point, buffer, bufsize))
 	     != NULL)
-	if (strcmp (mount_point.mnt_type, path_proc) == 0)
+	if (strcmp (mount_point.mnt_type, "proc") == 0)
 	  {
 	    result = mount_point.mnt_dir;
 	    break;
@@ -78,7 +78,7 @@
   if (copy_result == NULL)
     return result;
 
-  /* Now strore the copied value.  But do it atomically.  */
+  /* Now store the copied value.  But do it atomically.  */
   assert (sizeof (long int) == sizeof (void *));
   if (compare_and_swap ((long int *) &mount_proc, (long int) 0,
 			(long int) copy_result) == 0)

-- 
 Andreas Jaeger
  SuSE Labs aj@suse.de
   private aj@arthur.inka.de

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]