aboutsummaryrefslogtreecommitdiff
path: root/util-linux/fbset.c
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2006-03-10 19:22:06 +0000
committerRob Landley <rob@landley.net>2006-03-10 19:22:06 +0000
commitbc68cd14ccaebc17e7e03a08e51fddfb91007624 (patch)
treebeb32cedafc6232bf8a49fe90f0769d471ea6791 /util-linux/fbset.c
parentdae6aa28598cb2353291f18ca52e768c3259165a (diff)
downloadbusybox-w32-bc68cd14ccaebc17e7e03a08e51fddfb91007624.tar.gz
busybox-w32-bc68cd14ccaebc17e7e03a08e51fddfb91007624.tar.bz2
busybox-w32-bc68cd14ccaebc17e7e03a08e51fddfb91007624.zip
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 2e895be8d..d2667cf84 100644
--- a/util-linux/fbset.c
+++ b/util-linux/fbset.c
@@ -38,11 +38,11 @@
38#define DEFAULTFBDEV FB_0 38#define DEFAULTFBDEV FB_0
39#define DEFAULTFBMODE "/etc/fb.modes" 39#define DEFAULTFBMODE "/etc/fb.modes"
40 40
41static const int OPT_CHANGE = (1 << 0);
42static const int OPT_INFO = (1 << 1);
43static const int OPT_READMODE = (1 << 2);
44
45enum { 41enum {
42 OPT_CHANGE = (1 << 0),
43 OPT_INFO = (1 << 1),
44 OPT_READMODE = (1 << 2),
45
46 CMD_FB = 1, 46 CMD_FB = 1,
47 CMD_DB = 2, 47 CMD_DB = 2,
48 CMD_GEOMETRY = 3, 48 CMD_GEOMETRY = 3,
@@ -84,8 +84,10 @@ enum {
84static unsigned int g_options = 0; 84static unsigned int g_options = 0;
85 85
86/* Stuff stolen from the kernel's fb.h */ 86/* Stuff stolen from the kernel's fb.h */
87static const int FBIOGET_VSCREENINFO = 0x4600; 87enum {
88static const int FBIOPUT_VSCREENINFO = 0x4601; 88 FBIOGET_VSCREENINFO = 0x4600,
89 FBIOPUT_VSCREENINFO = 0x4601
90};
89struct fb_bitfield { 91struct fb_bitfield {
90 uint32_t offset; /* beginning of bitfield */ 92 uint32_t offset; /* beginning of bitfield */
91 uint32_t length; /* length of bitfield */ 93 uint32_t length; /* length of bitfield */
@@ -179,12 +181,14 @@ static const struct cmdoptions_t {
179 181
180#ifdef CONFIG_FEATURE_FBSET_READMODE 182#ifdef CONFIG_FEATURE_FBSET_READMODE
181/* taken from linux/fb.h */ 183/* taken from linux/fb.h */
182static const int FB_VMODE_INTERLACED = 1; /* interlaced */ 184enum {
183static const int FB_VMODE_DOUBLE = 2; /* double scan */ 185 FB_VMODE_INTERLACED = 1, /* interlaced */
184static const int FB_SYNC_HOR_HIGH_ACT = 1; /* horizontal sync high active */ 186 FB_VMODE_DOUBLE = 2, /* double scan */
185static const int FB_SYNC_VERT_HIGH_ACT = 2; /* vertical sync high active */ 187 FB_SYNC_HOR_HIGH_ACT = 1, /* horizontal sync high active */
186static const int FB_SYNC_EXT = 4; /* external sync */ 188 FB_SYNC_VERT_HIGH_ACT = 2, /* vertical sync high active */
187static const int FB_SYNC_COMP_HIGH_ACT = 8; /* composite sync high active */ 189 FB_SYNC_EXT = 4, /* external sync */
190 FB_SYNC_COMP_HIGH_ACT = 8 /* composite sync high active */
191};
188#endif 192#endif
189static int readmode(struct fb_var_screeninfo *base, const char *fn, 193static int readmode(struct fb_var_screeninfo *base, const char *fn,
190 const char *mode) 194 const char *mode)