summaryrefslogtreecommitdiff
path: root/util-linux/fbset.c
diff options
context:
space:
mode:
authorRob Landley2006-03-10 19:22:06 +0000
committerRob Landley2006-03-10 19:22:06 +0000
commitbc68cd14ccaebc17e7e03a08e51fddfb91007624 (patch)
treebeb32cedafc6232bf8a49fe90f0769d471ea6791 /util-linux/fbset.c
parentdae6aa28598cb2353291f18ca52e768c3259165a (diff)
downloadbusybox-bc68cd14ccaebc17e7e03a08e51fddfb91007624.zip
busybox-bc68cd14ccaebc17e7e03a08e51fddfb91007624.tar.gz
Patch from Denis Vlasenko turning static const int (which gets emitted into
the busybox binary) into enums (which don't).
Diffstat (limited to 'util-linux/fbset.c')
-rw-r--r--util-linux/fbset.c28
1 files changed, 16 insertions, 12 deletions
diff --git a/util-linux/fbset.c b/util-linux/fbset.c
index 2e895be..d2667cf 100644
--- a/util-linux/fbset.c
+++ b/util-linux/fbset.c
@@ -38,11 +38,11 @@
#define DEFAULTFBDEV FB_0
#define DEFAULTFBMODE "/etc/fb.modes"
-static const int OPT_CHANGE = (1 << 0);
-static const int OPT_INFO = (1 << 1);
-static const int OPT_READMODE = (1 << 2);
-
enum {
+ OPT_CHANGE = (1 << 0),
+ OPT_INFO = (1 << 1),
+ OPT_READMODE = (1 << 2),
+
CMD_FB = 1,
CMD_DB = 2,
CMD_GEOMETRY = 3,
@@ -84,8 +84,10 @@ enum {
static unsigned int g_options = 0;
/* Stuff stolen from the kernel's fb.h */
-static const int FBIOGET_VSCREENINFO = 0x4600;
-static const int FBIOPUT_VSCREENINFO = 0x4601;
+enum {
+ FBIOGET_VSCREENINFO = 0x4600,
+ FBIOPUT_VSCREENINFO = 0x4601
+};
struct fb_bitfield {
uint32_t offset; /* beginning of bitfield */
uint32_t length; /* length of bitfield */
@@ -179,12 +181,14 @@ static const struct cmdoptions_t {
#ifdef CONFIG_FEATURE_FBSET_READMODE
/* taken from linux/fb.h */
-static const int FB_VMODE_INTERLACED = 1; /* interlaced */
-static const int FB_VMODE_DOUBLE = 2; /* double scan */
-static const int FB_SYNC_HOR_HIGH_ACT = 1; /* horizontal sync high active */
-static const int FB_SYNC_VERT_HIGH_ACT = 2; /* vertical sync high active */
-static const int FB_SYNC_EXT = 4; /* external sync */
-static const int FB_SYNC_COMP_HIGH_ACT = 8; /* composite sync high active */
+enum {
+ FB_VMODE_INTERLACED = 1, /* interlaced */
+ FB_VMODE_DOUBLE = 2, /* double scan */
+ FB_SYNC_HOR_HIGH_ACT = 1, /* horizontal sync high active */
+ FB_SYNC_VERT_HIGH_ACT = 2, /* vertical sync high active */
+ FB_SYNC_EXT = 4, /* external sync */
+ FB_SYNC_COMP_HIGH_ACT = 8 /* composite sync high active */
+};
#endif
static int readmode(struct fb_var_screeninfo *base, const char *fn,
const char *mode)