Ignore:
Timestamp:
Dec 20, 2016, 4:07:32 PM (7 years ago)
Author:
Bruno Cornec
Message:

New 3?3 banch for incorporation of latest busybox 1.25. Changing minor version to handle potential incompatibilities.

Location:
branches/3.3
Files:
1 edited
1 copied

Legend:

Unmodified
Added
Removed
  • branches/3.3/mindi-busybox/miscutils/fbsplash.c

    r3232 r3621  
    3535
    3636#include "libbb.h"
     37#include "common_bufsiz.h"
    3738#include <linux/fb.h>
    3839
     
    151152    // map the device in memory
    152153    G.addr = mmap(NULL,
    153             G.scr_var.yres * G.scr_fix.line_length,
     154            (G.scr_var.yres_virtual ?: G.scr_var.yres) * G.scr_fix.line_length,
    154155            PROT_WRITE, MAP_SHARED, fbfd, 0);
    155156    if (G.addr == MAP_FAILED)
     
    354355        theme_file = stdin;
    355356    } else {
    356         int fd = open_zipped(G.image_filename);
     357        int fd = open_zipped(G.image_filename, /*fail_if_not_compressed:*/ 0);
    357358        if (fd < 0)
    358359            bb_simple_perror_msg_and_die(G.image_filename);
     
    374375     */
    375376#define concat_buf bb_common_bufsiz1
     377    setup_common_bufsiz();
     378
    376379    read_ptr = concat_buf;
    377380    while (1) {
    378381        int w, h, max_color_val;
    379         int rem = concat_buf + sizeof(concat_buf) - read_ptr;
     382        int rem = concat_buf + COMMON_BUFSIZE - read_ptr;
    380383        if (rem < 2
    381384         || fgets(read_ptr, rem, theme_file) == NULL
     
    517520    // already in the pipe
    518521    while ((num_buf = xmalloc_fgetline(fp)) != NULL) {
    519         if (strncmp(num_buf, "exit", 4) == 0) {
     522        if (is_prefixed_with(num_buf, "exit")) {
    520523            DEBUG_MESSAGE("exit");
    521524            break;
Note: See TracChangeset for help on using the changeset viewer.