]> git.pld-linux.org Git - packages/util-linux.git/commitdiff
- big geometry patch
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Thu, 11 May 2000 13:46:34 +0000 (13:46 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    util-linux-fdisk2.patch -> 1.1

util-linux-fdisk2.patch [new file with mode: 0644]

diff --git a/util-linux-fdisk2.patch b/util-linux-fdisk2.patch
new file mode 100644 (file)
index 0000000..41b052d
--- /dev/null
@@ -0,0 +1,45 @@
+diff -urN util-linux-2.10l.org/fdisk/fdisk.c util-linux-2.10l/fdisk/fdisk.c
+--- util-linux-2.10l.org/fdisk/fdisk.c Thu May 11 15:40:28 2000
++++ util-linux-2.10l/fdisk/fdisk.c     Thu May 11 15:42:56 2000
+@@ -696,7 +696,11 @@
+ get_geometry(int fd, struct geom *g) {
+       int sec_fac;
+       long longsectors;
++#ifdef HDIO_GETGEO_BIG
++      struct hd_big_geometry geometry;
++#else
+       struct hd_geometry geometry;
++#endif
+       int res1, res2;
+       get_sectorsize(fd);
+@@ -708,7 +712,11 @@
+ #ifdef HDIO_REQ
+       res2 = ioctl(fd, HDIO_REQ, &geometry);
+ #else
++#ifdef HDIO_GETGEO_BIG
++      res2 = ioctl(fd, HDIO_GETGEO_BIG, &geometry);
++#else
+       res2 = ioctl(fd, HDIO_GETGEO, &geometry);
++#endif
+ #endif
+       /* never use geometry.cylinders - it is truncated */
+diff -urN util-linux-2.10l.org/fdisk/sfdisk.c util-linux-2.10l/fdisk/sfdisk.c
+--- util-linux-2.10l.org/fdisk/sfdisk.c        Thu May 11 15:40:28 2000
++++ util-linux-2.10l/fdisk/sfdisk.c    Thu May 11 15:43:53 2000
+@@ -376,6 +376,14 @@
+  *      unsigned long start;
+  * };
+  *
++ * <linux/hdreg.h> defines HDIO_GETGEO_BIG and
++ * struct hd_big_geometry {
++ *      unsigned char heads;
++ *      unsigned char sectors;
++ *      unsigned int cylinders;
++ *      unsigned long start;
++ * };
++ *
+  * For large disks g.cylinders is truncated, so we use BLKGETSIZE.
+  */
This page took 0.043982 seconds and 4 git commands to generate.