diff options
author | Rob Landley <rob@landley.net> | 2006-03-10 19:22:06 +0000 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2006-03-10 19:22:06 +0000 |
commit | bc68cd14ccaebc17e7e03a08e51fddfb91007624 (patch) | |
tree | beb32cedafc6232bf8a49fe90f0769d471ea6791 /util-linux/fbset.c | |
parent | dae6aa28598cb2353291f18ca52e768c3259165a (diff) | |
download | busybox-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.c | 28 |
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 | ||
41 | static const int OPT_CHANGE = (1 << 0); | ||
42 | static const int OPT_INFO = (1 << 1); | ||
43 | static const int OPT_READMODE = (1 << 2); | ||
44 | |||
45 | enum { | 41 | enum { |
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 { | |||
84 | static unsigned int g_options = 0; | 84 | static 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 */ |
87 | static const int FBIOGET_VSCREENINFO = 0x4600; | 87 | enum { |
88 | static const int FBIOPUT_VSCREENINFO = 0x4601; | 88 | FBIOGET_VSCREENINFO = 0x4600, |
89 | FBIOPUT_VSCREENINFO = 0x4601 | ||
90 | }; | ||
89 | struct fb_bitfield { | 91 | struct 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 */ |
182 | static const int FB_VMODE_INTERLACED = 1; /* interlaced */ | 184 | enum { |
183 | static const int FB_VMODE_DOUBLE = 2; /* double scan */ | 185 | FB_VMODE_INTERLACED = 1, /* interlaced */ |
184 | static const int FB_SYNC_HOR_HIGH_ACT = 1; /* horizontal sync high active */ | 186 | FB_VMODE_DOUBLE = 2, /* double scan */ |
185 | static const int FB_SYNC_VERT_HIGH_ACT = 2; /* vertical sync high active */ | 187 | FB_SYNC_HOR_HIGH_ACT = 1, /* horizontal sync high active */ |
186 | static const int FB_SYNC_EXT = 4; /* external sync */ | 188 | FB_SYNC_VERT_HIGH_ACT = 2, /* vertical sync high active */ |
187 | static 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 |
189 | static int readmode(struct fb_var_screeninfo *base, const char *fn, | 193 | static int readmode(struct fb_var_screeninfo *base, const char *fn, |
190 | const char *mode) | 194 | const char *mode) |