From d6f2829014e6421ee33903f1f494763a165da75f Mon Sep 17 00:00:00 2001 From: Stephan Raue Date: Wed, 21 Jul 2010 22:35:50 +0200 Subject: [PATCH] busybox: update upstream patches Signed-off-by: Stephan Raue --- .../patches/busybox-1.17.0-build_system.diff | 11 +++- .../patches/busybox-1.17.0-dos2unix.diff | 2 +- .../busybox/patches/busybox-1.17.0-vi.diff | 60 +++++++++++++++++++ 3 files changed, 71 insertions(+), 2 deletions(-) create mode 100644 packages/sysutils/busybox/patches/busybox-1.17.0-vi.diff diff --git a/packages/sysutils/busybox/patches/busybox-1.17.0-build_system.diff b/packages/sysutils/busybox/patches/busybox-1.17.0-build_system.diff index 02292fa0c3..48da75799b 100644 --- a/packages/sysutils/busybox/patches/busybox-1.17.0-build_system.diff +++ b/packages/sysutils/busybox/patches/busybox-1.17.0-build_system.diff @@ -25,7 +25,16 @@ diff -urpN busybox-1.17.0/archival/Config.src busybox-1.17.0-build_system/archiv extract contents from archives. An archive is a single file holding diff -urpN busybox-1.17.0/Config.in busybox-1.17.0-build_system/Config.in --- busybox-1.17.0/Config.in 2010-06-24 04:40:43.000000000 +0200 -+++ busybox-1.17.0-build_system/Config.in 2010-07-14 08:14:26.000000000 +0200 ++++ busybox-1.17.0-build_system/Config.in 2010-07-20 04:54:55.000000000 +0200 +@@ -15,7 +15,7 @@ menu "General Configuration" + + config DESKTOP + bool "Enable options for full-blown desktop systems" +- default n ++ default y + help + Enable options and features which are not essential. + Select this only if you plan to use busybox on full-blown @@ -138,6 +138,7 @@ config UNICODE_USING_LOCALE help With this option on, Unicode support is implemented using libc diff --git a/packages/sysutils/busybox/patches/busybox-1.17.0-dos2unix.diff b/packages/sysutils/busybox/patches/busybox-1.17.0-dos2unix.diff index e1231e2431..dde59e0466 100644 --- a/packages/sysutils/busybox/patches/busybox-1.17.0-dos2unix.diff +++ b/packages/sysutils/busybox/patches/busybox-1.17.0-dos2unix.diff @@ -1,6 +1,6 @@ diff -urpN busybox-1.17.0/coreutils/dos2unix.c busybox-1.17.0-dos2unix/coreutils/dos2unix.c --- busybox-1.17.0/coreutils/dos2unix.c 2010-06-24 04:40:43.000000000 +0200 -+++ busybox-1.17.0-dos2unix/coreutils/dos2unix.c 2010-07-18 22:11:40.000000000 +0200 ++++ busybox-1.17.0-dos2unix/coreutils/dos2unix.c 2010-07-17 22:40:21.021422169 +0200 @@ -92,7 +92,7 @@ int dos2unix_main(int argc UNUSED_PARAM, do { /* might be convert(NULL) if there is no filename given */ diff --git a/packages/sysutils/busybox/patches/busybox-1.17.0-vi.diff b/packages/sysutils/busybox/patches/busybox-1.17.0-vi.diff new file mode 100644 index 0000000000..cc61c873fb --- /dev/null +++ b/packages/sysutils/busybox/patches/busybox-1.17.0-vi.diff @@ -0,0 +1,60 @@ +diff -urpN busybox-1.17.0/editors/vi.c busybox-1.17.0-vi/editors/vi.c +--- busybox-1.17.0/editors/vi.c 2010-07-04 04:17:40.000000000 +0200 ++++ busybox-1.17.0-vi/editors/vi.c 2010-07-21 12:19:36.827970040 +0200 +@@ -504,20 +504,17 @@ static int init_text_buffer(char *fn) + } + + #if ENABLE_FEATURE_VI_WIN_RESIZE +-static void query_screen_dimensions(void) ++static int query_screen_dimensions(void) + { +-# if ENABLE_FEATURE_VI_ASK_TERMINAL +- if (!G.get_rowcol_error) +- G.get_rowcol_error = +-# endif +- get_terminal_width_height(STDIN_FILENO, &columns, &rows); ++ int err = get_terminal_width_height(STDIN_FILENO, &columns, &rows); + if (rows > MAX_SCR_ROWS) + rows = MAX_SCR_ROWS; + if (columns > MAX_SCR_COLS) + columns = MAX_SCR_COLS; ++ return err; + } + #else +-# define query_screen_dimensions() ((void)0) ++# define query_screen_dimensions() (0) + #endif + + static void edit_file(char *fn) +@@ -536,7 +533,7 @@ static void edit_file(char *fn) + rows = 24; + columns = 80; + size = 0; +- query_screen_dimensions(); ++ IF_FEATURE_VI_ASK_TERMINAL(G.get_rowcol_error =) query_screen_dimensions(); + #if ENABLE_FEATURE_VI_ASK_TERMINAL + if (G.get_rowcol_error /* TODO? && no input on stdin */) { + uint64_t k; +@@ -546,9 +543,12 @@ static void edit_file(char *fn) + if ((int32_t)k == KEYCODE_CURSOR_POS) { + uint32_t rc = (k >> 32); + columns = (rc & 0x7fff); ++ if (columns > MAX_SCR_COLS) ++ columns = MAX_SCR_COLS; + rows = ((rc >> 16) & 0x7fff); ++ if (rows > MAX_SCR_ROWS) ++ rows = MAX_SCR_ROWS; + } +- query_screen_dimensions(); + } + #endif + new_screen(rows, columns); // get memory for virtual screen +@@ -2797,7 +2797,7 @@ static void refresh(int full_screen) + int li, changed; + char *tp, *sp; // pointer into text[] and screen[] + +- if (ENABLE_FEATURE_VI_WIN_RESIZE) { ++ if (ENABLE_FEATURE_VI_WIN_RESIZE IF_FEATURE_VI_ASK_TERMINAL(&& !G.get_rowcol_error) ) { + unsigned c = columns, r = rows; + query_screen_dimensions(); + full_screen |= (c - columns) | (r - rows);