Credited Christophe Boyaniqu for interactive patch to rm.
[oweals/busybox.git] / fbset.c
diff --git a/fbset.c b/fbset.c
index 72284a6c5eebab6e41a90b0f87c9856bf56149c3..80711ec9f3f0cc3bae0283072b627ff14487ff45 100644 (file)
--- a/fbset.c
+++ b/fbset.c
@@ -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"))) {