Changeset 3621 in MondoRescue for branches/3.3/mindi-busybox/miscutils/fbsplash.c
- Timestamp:
- Dec 20, 2016, 4:07:32 PM (7 years ago)
- Location:
- branches/3.3
- Files:
-
- 1 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/3.3/mindi-busybox/miscutils/fbsplash.c
r3232 r3621 35 35 36 36 #include "libbb.h" 37 #include "common_bufsiz.h" 37 38 #include <linux/fb.h> 38 39 … … 151 152 // map the device in memory 152 153 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, 154 155 PROT_WRITE, MAP_SHARED, fbfd, 0); 155 156 if (G.addr == MAP_FAILED) … … 354 355 theme_file = stdin; 355 356 } else { 356 int fd = open_zipped(G.image_filename );357 int fd = open_zipped(G.image_filename, /*fail_if_not_compressed:*/ 0); 357 358 if (fd < 0) 358 359 bb_simple_perror_msg_and_die(G.image_filename); … … 374 375 */ 375 376 #define concat_buf bb_common_bufsiz1 377 setup_common_bufsiz(); 378 376 379 read_ptr = concat_buf; 377 380 while (1) { 378 381 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; 380 383 if (rem < 2 381 384 || fgets(read_ptr, rem, theme_file) == NULL … … 517 520 // already in the pipe 518 521 while ((num_buf = xmalloc_fgetline(fp)) != NULL) { 519 if ( strncmp(num_buf, "exit", 4) == 0) {522 if (is_prefixed_with(num_buf, "exit")) { 520 523 DEBUG_MESSAGE("exit"); 521 524 break;
Note:
See TracChangeset
for help on using the changeset viewer.