From 3f6849708e599fc30081f1ff2b645af64644314d Mon Sep 17 00:00:00 2001 From: Dennis Groenen Date: Wed, 22 Aug 2012 12:57:06 +0200 Subject: [PATCH] apply BusyBox 1.20.2 hotfixes --- .../hotfixes/busybox-1.20.2-kernel_ver.patch | 25 ++++++++++++++++++++ debian/patches/series | 1 + 2 files changed, 26 insertions(+) create mode 100644 debian/patches/hotfixes/busybox-1.20.2-kernel_ver.patch diff --git a/debian/patches/hotfixes/busybox-1.20.2-kernel_ver.patch b/debian/patches/hotfixes/busybox-1.20.2-kernel_ver.patch new file mode 100644 index 0000000..456fb08 --- /dev/null +++ b/debian/patches/hotfixes/busybox-1.20.2-kernel_ver.patch @@ -0,0 +1,25 @@ +--- busybox-1.20.2/libbb/kernel_version.c ++++ busybox-1.20.2-kernel_ver/libbb/kernel_version.c +@@ -20,18 +20,15 @@ + int FAST_FUNC get_linux_version_code(void) + { + struct utsname name; +- char *s; ++ char *s, *t; + int i, r; + +- if (uname(&name) == -1) { +- bb_perror_msg("can't get system information"); +- return 0; +- } +- ++ uname(&name); /* never fails */ + s = name.release; + r = 0; + for (i = 0; i < 3; i++) { +- r = r * 256 + atoi(strtok(s, ".")); ++ t = strtok(s, "."); ++ r = r * 256 + (t ? atoi(t) : 0); + s = NULL; + } + return r; diff --git a/debian/patches/series b/debian/patches/series index 00a9e92..e1fb88d 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -19,6 +19,7 @@ ps-accept-and-ignore-missing-options.patch showkey-default-option.patch # Hotfixes +hotfixes/busybox-1.20.2-kernel_ver.patch # Dark blue on black is nearly impossible to read, use red. # Leaving this commented out as dark blue on white is fine, and there isn't any -- 1.7.9.5