[oe-commits] org.oe.dev Unslung: slingbox - fix read_hex routine causing busybox fdisk failures

mwester commit openembedded-commits at lists.openembedded.org
Thu Jun 7 03:34:29 UTC 2007


Unslung: slingbox - fix read_hex routine causing busybox fdisk failures

Author: mwester at openembedded.org
Branch: org.openembedded.dev
Revision: 48c054bdb6b41b760afa8a343847c539f5ebf826
ViewMTN: http://monotone.openembedded.org/revision.psp?id=48c054bdb6b41b760afa8a343847c539f5ebf826
Files:
1
packages/busybox/slingbox-1.3.1/fdisk-readhex.patch
packages/busybox/slingbox_1.3.1.bb
Diffs:

#
# mt diff -r2ae8bcb602805ae4e0f884f4105f92526dd1c0db -r48c054bdb6b41b760afa8a343847c539f5ebf826
#
# 
# 
# add_file "packages/busybox/slingbox-1.3.1/fdisk-readhex.patch"
#  content [018c0295334aa0554f0540625a92f2e564633193]
# 
# patch "packages/busybox/slingbox_1.3.1.bb"
#  from [b5a1753ec92314354c2f39a66283165576a9fb1e]
#    to [f366957202587b2eaefca465454f5dc881c4a445]
# 
============================================================
--- packages/busybox/slingbox-1.3.1/fdisk-readhex.patch	018c0295334aa0554f0540625a92f2e564633193
+++ packages/busybox/slingbox-1.3.1/fdisk-readhex.patch	018c0295334aa0554f0540625a92f2e564633193
@@ -0,0 +1,20 @@
+--- busybox-1.3.1/util-linux/fdisk.c.orig	2007-06-06 21:18:45.000000000 -0500
++++ busybox-1.3.1/util-linux/fdisk.c	2007-06-06 21:17:20.000000000 -0500
+@@ -331,13 +331,16 @@
+ read_hex(const struct systypes *sys)
+ {
+ 	unsigned long v;
++	char *e;
+ 	while (1) {
+ 		read_nonempty(_("Hex code (type L to list codes): "));
+ 		if (*line_ptr == 'l' || *line_ptr == 'L') {
+ 			list_types(sys);
+ 			continue;
+ 		}
+-		v = bb_strtoul(line_ptr, NULL, 16);
++		v = bb_strtoul(line_ptr, &e, 16);
++		/* Clear out EINVAL code if it's because of the trailing \n */
++		if ((errno == EINVAL) && (*e == '\n')) errno = 0;
+ 		if (errno || v > 0xff) continue;
+ 		return v;
+ 	}
============================================================
--- packages/busybox/slingbox_1.3.1.bb	b5a1753ec92314354c2f39a66283165576a9fb1e
+++ packages/busybox/slingbox_1.3.1.bb	f366957202587b2eaefca465454f5dc881c4a445
@@ -1,10 +1,10 @@ PRIORITY = "required"
 DESCRIPTION = "SlingBox is a minimal version of BusyBox with just enough functionality \
 to enable ipkg to run on an Unslung NSLU2 device."
 HOMEPAGE = "http://www.busybox.net"
 LICENSE = "GPL"
 SECTION = "base"
 PRIORITY = "required"
-PR = "r0"
+PR = "r1"
 COMPATIBLE_MACHINE = "nslu2"
 
 SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.gz \
@@ -12,12 +12,11 @@ SRC_URI = "http://www.busybox.net/downlo
            file://shadow_h_is_required.patch;patch=1 \
            file://df_rootfs.patch;patch=1 \
            file://lazy_umount.patch;patch=1 \
-           file://halt.patch;patch=1" \
+           file://halt.patch;patch=1 \
+           file://fdisk-readhex.patch;patch=1 \
            file://slingbox_name.patch;patch=1 \
            file://slingbox.patch;patch=1"
 
-#           file://wget-long-options.patch;patch=1 \
-
 S = "${WORKDIR}/busybox-${PV}"
 
 export EXTRA_CFLAGS = "${CFLAGS}"






More information about the Openembedded-commits mailing list