From 08ec67bc62242503f77d9503fdbf820c9c12d856 Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Wed, 26 Mar 2008 13:32:30 +0000 Subject: patch: add support for -R. ~ +110 byte. By Pascal Bellard fbsplash: new applet by Michele Sanges cnt_history; hi > 0;) { - hi--; - free(state->history[hi]); - } + /* NB: do not trash old history if file can't be opened */ fp = fopen(fromfile, "r"); if (fp) { + /* clean up old history */ + for (hi = state->cnt_history; hi > 0;) { + hi--; + free(state->history[hi]); + } + for (hi = 0; hi < MAX_HISTORY;) { char *hl = xmalloc_getline(fp); int l; @@ -982,8 +984,8 @@ static void load_history(const char *fromfile) state->history[hi++] = hl; } fclose(fp); + state->cur_history = state->cnt_history = hi; } - state->cur_history = state->cnt_history = hi; } /* state->flags is already checked to be nonzero */ diff --git a/miscutils/Config.in b/miscutils/Config.in index e149e41..04c9a0c 100644 --- a/miscutils/Config.in +++ b/miscutils/Config.in @@ -194,12 +194,33 @@ config EJECT Used to eject cdroms. (defaults to /dev/cdrom) config FEATURE_EJECT_SCSI - bool "SCSI support" - default n - depends on EJECT - help - Add the -s option to eject, this allows to eject SCSI-Devices and - usb-storage devices. + bool "SCSI support" + default n + depends on EJECT + help + Add the -s option to eject, this allows to eject SCSI-Devices and + usb-storage devices. + +config FBSPLASH + bool "fbsplash" + default n + help + Shows splash image and progress bar on framebuffer device. + Can be used during boot phase of an embedded device. ~2kb. + Usage: + - use kernel option 'vga=xxx' or otherwise enable fb device. + - put somewhere the fbsplash.ini file and image in .ppm format. + - $ setsid fbsplash [params] & + -c: hide cursor + -d /dev/fbN: framebuffer device (if not /dev/fb0) + -s path_of_image_file + -i path_of_ini_file + -f path_of_fifo (can be "-" for stdin) + - if you want to run applet only in presence of kernel parameter: + grep -q "fbsplash=on"