[oe-commits] Felix Domke : util-linux: fix support for >2**32 sectors in sfdisk

GIT User account git at amethyst.openembedded.net
Mon Jan 12 16:08:47 UTC 2009


Module: openembedded.git
Branch: org.openembedded.dreambox
Commit: 6b005d0274bc4b86214a7e91b708f5c46aedf43a
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=6b005d0274bc4b86214a7e91b708f5c46aedf43a

Author: Felix Domke <tmbinc at elitedvb.net>
Date:   Mon Jan 12 17:06:55 2009 +0100

util-linux: fix support for >2**32 sectors in sfdisk

---

 .../util-linux/files/sfdisk-fix-large-drives.patch |   30 ++++++++++++++++++++
 packages/util-linux/util-linux_2.12r.bb            |    3 +-
 2 files changed, 32 insertions(+), 1 deletions(-)

diff --git a/packages/util-linux/files/sfdisk-fix-large-drives.patch b/packages/util-linux/files/sfdisk-fix-large-drives.patch
new file mode 100644
index 0000000..5649c53
--- /dev/null
+++ b/packages/util-linux/files/sfdisk-fix-large-drives.patch
@@ -0,0 +1,30 @@
+Index: util-linux-2.12r/fdisk/sfdisk.c
+===================================================================
+--- util-linux-2.12r.orig/fdisk/sfdisk.c	2009-01-12 17:00:24.000000000 +0100
++++ util-linux-2.12r/fdisk/sfdisk.c	2009-01-12 17:04:27.000000000 +0100
+@@ -1951,6 +1951,7 @@
+       delta = 0;
+ 
+     if (delta < 0) {
++#if 0 /*@@@@@*/
+ 	p->start -= delta;
+ 	p->size += delta;
+ 	if (is_extended(p->p.sys_type) && boxes == ONESECTOR)
+@@ -1959,6 +1960,17 @@
+ 	    warn(_("no room for partition descriptor\n"));
+ 	    return 0;
+ 	}
++#else
++	unsigned long old_size = p->size;
++	p->start -= delta;
++	p->size += delta;
++	if (is_extended(p->p.sys_type) && boxes == ONESECTOR)
++	    p->size = inc;
++	else if ( old_size <= -delta ) {
++	    warn(_("no room for partition descriptor\n"));
++	    return 0;
++	}
++#endif
+     }
+     base = (!ep ? 0
+ 	        : (is_extended(p->p.sys_type) ?
diff --git a/packages/util-linux/util-linux_2.12r.bb b/packages/util-linux/util-linux_2.12r.bb
index 179ea63..ab6f2aa 100644
--- a/packages/util-linux/util-linux_2.12r.bb
+++ b/packages/util-linux/util-linux_2.12r.bb
@@ -5,5 +5,6 @@ SRC_URI += "file://glibc-fix.patch;patch=1"
 SRC_URI += "file://glibc-umount2.patch;patch=1"
 SRC_URI += "file://fdiskbsdlabel-avr32.patch;patch=1" 
 SRC_URI += "file://util-linux-2.12r-cramfs-1.patch;patch=1" 
+SRC_URI += "file://sfdisk-fix-large-drives.patch;patch=1"
 
-FILE_PR = "r15"
+FILE_PR = "r16"





More information about the Openembedded-commits mailing list