Репозиторий ALT Linux backports/2.4
Последнее обновление: 9 июля 2008 | Пакетов: 497 | Посещений: 1584412
 поиск   регистрация   авторизация 
 
Группа :: Система/Основа
Пакет: util-linux

 Главная   Изменения   Спек   Патчи   Загрузить   Bugs and FR 

Патч: util-linux-2.11x-rh-mdk-procpartitions-37436.patch


--- ./disk-utils/blockdev.c.procpartitions	2002-03-08 23:57:02.000000000 +0100
+++ ./disk-utils/blockdev.c	2002-11-06 09:08:15.000000000 +0100
@@ -290,6 +290,7 @@
 	char ptname[200];
 	char device[210];
 	int ma, mi, sz;
+	char iobuf[16*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 ]",
--- ./fdisk/fdisk.c.procpartitions	2002-11-06 09:08:15.000000000 +0100
+++ ./fdisk/fdisk.c	2002-11-06 09:08:15.000000000 +0100
@@ -2363,12 +2363,14 @@
 	FILE *procpt;
 	char line[100], ptname[100], devname[120], *s;
 	int ma, mi, sz;
+	char iobuf[16*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 ]",
--- ./mount/mount_by_label.c.procpartitions	2002-10-31 18:42:59.000000000 +0100
+++ ./mount/mount_by_label.c	2002-11-06 09:18:10.000000000 +0100
@@ -242,9 +242,7 @@
 	char device[110];
 	int firstPass;
 	int handleOnFirst;
-#if 0
-	char iobuf[32*1024];	/* For setvbuf */
-#endif
+	char iobuf[16*1024];
 
 	if (uuidCache)
 		return;
@@ -272,9 +270,9 @@
    to keep statistics in /proc/partitions. Of course, statistics belong
    in some /proc/diskstats, not in some /proc file that happened to
    exist already. */
+#endif
 
 	setvbuf(procpt, iobuf, _IOFBF, sizeof(iobuf));
-#endif
 
 	for (firstPass = 1; firstPass >= 0; firstPass--) {
 	    fseek(procpt, 0, SEEK_SET);
 
design & coding: Vladimir Lettiev aka crux © 2004-2005