Credited Christophe Boyaniqu for interactive patch to rm.
[oweals/busybox.git] / fbset.c
diff --git a/fbset.c b/fbset.c
index 9acabbecb2ea4629fe0ce2d3b1f66708df8ec555..80711ec9f3f0cc3bae0283072b627ff14487ff45 100644 (file)
--- a/fbset.c
+++ b/fbset.c
@@ -24,7 +24,6 @@
  *     Geert Uytterhoeven (Geert.Uytterhoeven@cs.kuleuven.ac.be)
  */
 
-#include "busybox.h"
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
@@ -33,6 +32,7 @@
 #include <ctype.h>
 #include <string.h>
 #include <sys/ioctl.h>
+#include "busybox.h"
 
 #define DEFAULTFBDEV  "/dev/fb0"
 #define DEFAULTFBMODE "/etc/fb.modes"
@@ -132,7 +132,7 @@ struct fb_var_screeninfo {
 };
 
 
-struct cmdoptions_t {
+static struct cmdoptions_t {
        char *name;
        unsigned char param_count;
        unsigned char code;
@@ -198,8 +198,7 @@ static int readmode(struct fb_var_screeninfo *base, const char *fn,
        char buf[256];
        char *p = buf;
 
-       if ((f = fopen(fn, "r")) == NULL)
-               perror_msg_and_die("readmode(fopen)");
+       f = xfopen(fn, "r");
        while (!feof(f)) {
                fgets(buf, sizeof(buf), f);
                if ((p = strstr(buf, "mode ")) || (p = strstr(buf, "mode\t"))) {