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

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

Патч: util-linux-2.12pre-rh-miscfixes.patch


--- util-linux-2.12pre/fdisk/fdisk.8.miscfixes	2002-08-06 10:33:33.000000000 -0400
+++ util-linux-2.12pre/fdisk/fdisk.8	2003-12-17 13:55:16.000000000 -0500
@@ -65,7 +65,7 @@
 name followed by a partition number.  For example,
 .B /dev/hda1
 is the first partition on the first IDE hard disk in the system.
-IDE disks can have up to 63 partitions, SCSI disks up to 15.
+Disks can have up to 15 partitions.
 See also
 .IR /usr/src/linux/Documentation/devices.txt .
 
--- util-linux-2.12pre/fdisk/fdisk.h.miscfixes	2003-07-13 14:25:00.000000000 -0400
+++ util-linux-2.12pre/fdisk/fdisk.h	2003-12-17 13:55:16.000000000 -0500
@@ -5,7 +5,7 @@
 #define DEFAULT_SECTOR_SIZE	512
 #define MAX_SECTOR_SIZE	2048
 #define SECTOR_SIZE	512	/* still used in BSD code */
-#define MAXIMUM_PARTS	60
+#define MAXIMUM_PARTS	16
 
 #define ACTIVE_FLAG     0x80
 
--- util-linux-2.12pre/fdisk/fdisk.c.miscfixes	2003-07-13 14:23:32.000000000 -0400
+++ util-linux-2.12pre/fdisk/fdisk.c	2003-12-17 13:55:16.000000000 -0500
@@ -18,6 +18,7 @@
 #include <errno.h>
 #include <getopt.h>
 #include <sys/stat.h>
+#include <sys/types.h>
 
 #include "nls.h"
 #include "common.h"
@@ -877,8 +878,8 @@
 	if (what == create_empty_dos)
 		goto got_dos_table;		/* skip reading disk */
 
-	if ((fd = open(disk_device, type_open)) < 0) {
-	    if ((fd = open(disk_device, O_RDONLY)) < 0) {
+	if ((fd = open(disk_device, type_open|O_LARGEFILE)) < 0) {
+	    if ((fd = open(disk_device, O_RDONLY|O_LARGEFILE)) < 0) {
 		if (what == try_only)
 		    return 1;
 		fatal(unable_to_open);
@@ -2348,7 +2349,7 @@
 	if (!user_specified)
 		if (is_ide_cdrom_or_tape(device))
 			return;
-	if ((fd = open(disk_device, type_open)) >= 0) {
+	if ((fd = open(disk_device, type_open|O_LARGEFILE)) >= 0) {
 		gb = get_boot(try_only);
 		if (gb > 0) {	/* I/O error */
 			close(fd);
@@ -2517,7 +2518,7 @@
 
 		for (j = optind; j < argc; j++) {
 			disk_device = argv[j];
-			if ((fd = open(disk_device, type_open)) < 0)
+			if ((fd = open(disk_device, type_open|O_LARGEFILE)) < 0)
 				fatal(unable_to_open);
 			if (ioctl(fd, BLKGETSIZE, &size))
 				fatal(ioctl_error);
 
design & coding: Vladimir Lettiev aka crux © 2004-2005