util-linux/util-linux-2.11y-procpartitions-37436.patch

71 lines
2.3 KiB
Diff
Raw Normal View History

auto-import changelog data from util-linux-2.11y-9.src.rpm Mon Feb 24 2003 Elliot Lee <sopwith@redhat.com> - rebuilt Wed Feb 19 2003 Elliot Lee <sopwith@redhat.com> 2.11y-8 - ipcs-84243.patch to fix #84243 Thu Feb 13 2003 Yukihiro Nakai <ynakai@redhat.com> 2.11y-7 - Update moremisc patch to fix swprintf()'s minimum field (bug #83361). Mon Feb 03 2003 Elliot Lee <sopwith@redhat.com> 2.11y-6 - Fix mcookie segfault on many 64-bit architectures (bug #83345). Mon Feb 03 2003 Tim Waugh <twaugh@redhat.com> 2.11y-5 - Fix underlined multibyte characters (bug #83376). Sun Feb 02 2003 Florian La Roche <Florian.LaRoche@redhat.de> - rebuild to have again a s390 rpm - disable some more apps for mainframe Wed Jan 29 2003 Elliot Lee <sopwith@redhat.com> 2.11y-4 - util-linux-2.11y-umask-82552.patch Wed Jan 22 2003 Tim Powers <timp@redhat.com> - rebuilt Mon Jan 13 2003 Elliot Lee <sopwith@redhat.com> 2.11y-2 - Fix #81069, #75421 Mon Jan 13 2003 Elliot Lee <sopwith@redhat.com> 2.11y-1 - Update to 2.11y - Fix #80953 - Update patch0, patch107, patch117, patch120 for 2.11y - Remove patch60, patch61, patch207, patch211, patch212, patch119, patch121 - Remove patch122, patch200 Wed Oct 30 2002 Elliot Lee <sopwith@redhat.com> 2.11w-2 - Remove some crack/unnecessary patches while submitting stuff upstream. - Build with -D_FILE_OFFSET_BITS=64 Tue Oct 29 2002 Elliot Lee <sopwith@redhat.com> 2.11w-1 - Update to 2.11w, resolve patch conflicts Tue Oct 08 2002 Phil Knirsch <pknirsch@redhat.com> 2.11r-10hammer.3 - Extended util-linux-2.11b-s390x patch to work again. Thu Oct 03 2002 Elliot Lee <sopwith@redhat.com> 2.11r-10hammer.2 - Add patch122 for hwclock on x86_64 Thu Sep 12 2002 Than Ngo <than@redhat.com> 2.11r-10hammer.1 - Fixed pam config files Wed Sep 11 2002 Bernhard Rosenkraenzer <bero@redhat.com> 2.11r-10hammer - Port to hammer
2004-09-13 20:57:34 +00:00
--- util-linux-2.11y/disk-utils/blockdev.c.procpartitions 2002-03-08 17:57:02.000000000 -0500
+++ util-linux-2.11y/disk-utils/blockdev.c 2003-01-13 14:28:41.000000000 -0500
@@ -290,6 +290,7 @@
char ptname[200];
char device[210];
int ma, mi, sz;
+ char iobuf[32*1024];
procpt = fopen(PROC_PARTITIONS, "r");
if (!procpt) {
@@ -297,6 +298,7 @@
progname, PROC_PARTITIONS);
exit(1);
}
+ setvbuf(procpt, iobuf, _IOFBF, sizeof(iobuf));
while (fgets(line, sizeof(line), procpt)) {
if (sscanf (line, " %d %d %d %[^\n ]",
--- util-linux-2.11y/fdisk/fdisk.c.procpartitions 2003-01-13 14:28:41.000000000 -0500
+++ util-linux-2.11y/fdisk/fdisk.c 2003-01-13 14:28:41.000000000 -0500
@@ -2371,12 +2371,14 @@
FILE *procpt;
char line[100], ptname[100], devname[120], *s;
int ma, mi, sz;
+ char iobuf[32*1024];
procpt = fopen(PROC_PARTITIONS, "r");
if (procpt == NULL) {
fprintf(stderr, _("cannot open %s\n"), PROC_PARTITIONS);
return;
}
+ setvbuf(procpt, iobuf, _IOFBF, sizeof(iobuf));
while (fgets(line, sizeof(line), procpt)) {
if (sscanf (line, " %d %d %d %[^\n ]",
--- util-linux-2.11y/mount/mount_by_label.c.procpartitions 2002-11-26 04:23:49.000000000 -0500
+++ util-linux-2.11y/mount/mount_by_label.c 2003-01-13 14:31:53.000000000 -0500
@@ -136,9 +136,7 @@
char device[110];
int firstPass;
int handleOnFirst;
-#if 0
char iobuf[32*1024]; /* For setvbuf */
-#endif
if (uuidCache)
return;
@@ -155,7 +153,6 @@
PROC_PARTITIONS);
return;
}
-#if 0
/* Ugly kludge - the contents of /proc/partitions change in time,
and this causes failures when the file is not read in one go.
In particular, one cannot use stdio on /proc/partitions.
@@ -166,9 +163,12 @@
to keep statistics in /proc/partitions. Of course, statistics belong
in some /proc/diskstats, not in some /proc file that happened to
exist already. */
-
+/* Until someone actually implements something else, /proc/partitions _IS_
+ /proc/diskstats. And no matter what file we are reading, we will still
+ need to increase the buffer size, because 8k is just not Enough For
+ Everyone even if stats aren't in /proc/partitions.
+*/
setvbuf(procpt, iobuf, _IOFBF, sizeof(iobuf));
-#endif
for (firstPass = 1; firstPass >= 0; firstPass--) {
fseek(procpt, 0, SEEK_SET);