summaryrefslogtreecommitdiff
path: root/console-tools
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 /console-tools
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 'console-tools')
-rw-r--r--console-tools/chvt.c6
-rw-r--r--console-tools/deallocvt.c2
-rw-r--r--console-tools/loadfont.c16
-rw-r--r--console-tools/setkeycodes.c4
4 files changed, 17 insertions, 11 deletions
diff --git a/console-tools/chvt.c b/console-tools/chvt.c
index b1a429eb3..252aed740 100644
--- a/console-tools/chvt.c
+++ b/console-tools/chvt.c
@@ -29,8 +29,10 @@
29#include "busybox.h" 29#include "busybox.h"
30 30
31/* From <linux/vt.h> */ 31/* From <linux/vt.h> */
32static const int VT_ACTIVATE = 0x5606; /* make vt active */ 32enum {
33static const int VT_WAITACTIVE = 0x5607; /* wait for vt active */ 33 VT_ACTIVATE = 0x5606, /* make vt active */
34 VT_WAITACTIVE = 0x5607 /* wait for vt active */
35};
34 36
35int chvt_main(int argc, char **argv) 37int chvt_main(int argc, char **argv)
36{ 38{
diff --git a/console-tools/deallocvt.c b/console-tools/deallocvt.c
index 00ddf4236..ad3cebfef 100644
--- a/console-tools/deallocvt.c
+++ b/console-tools/deallocvt.c
@@ -30,7 +30,7 @@
30#include "busybox.h" 30#include "busybox.h"
31 31
32/* From <linux/vt.h> */ 32/* From <linux/vt.h> */
33static const int VT_DISALLOCATE = 0x5608; /* free memory associated to vt */ 33enum { VT_DISALLOCATE = 0x5608 }; /* free memory associated to vt */
34 34
35int deallocvt_main(int argc, char *argv[]) 35int deallocvt_main(int argc, char *argv[])
36{ 36{
diff --git a/console-tools/loadfont.c b/console-tools/loadfont.c
index 31c6d2495..31221e080 100644
--- a/console-tools/loadfont.c
+++ b/console-tools/loadfont.c
@@ -21,13 +21,15 @@
21#include <endian.h> 21#include <endian.h>
22#include "busybox.h" 22#include "busybox.h"
23 23
24static const int PSF_MAGIC1 = 0x36; 24enum{
25static const int PSF_MAGIC2 = 0x04; 25 PSF_MAGIC1 = 0x36,
26 26 PSF_MAGIC2 = 0x04,
27static const int PSF_MODE512 = 0x01; 27
28static const int PSF_MODEHASTAB = 0x02; 28 PSF_MODE512 = 0x01,
29static const int PSF_MAXMODE = 0x03; 29 PSF_MODEHASTAB = 0x02,
30static const int PSF_SEPARATOR = 0xFFFF; 30 PSF_MAXMODE = 0x03,
31 PSF_SEPARATOR = 0xFFFF
32};
31 33
32struct psf_header { 34struct psf_header {
33 unsigned char magic1, magic2; /* Magic number */ 35 unsigned char magic1, magic2; /* Magic number */
diff --git a/console-tools/setkeycodes.c b/console-tools/setkeycodes.c
index efb6e658f..dacf37b12 100644
--- a/console-tools/setkeycodes.c
+++ b/console-tools/setkeycodes.c
@@ -33,7 +33,9 @@
33struct kbkeycode { 33struct kbkeycode {
34 unsigned int scancode, keycode; 34 unsigned int scancode, keycode;
35}; 35};
36static const int KDSETKEYCODE = 0x4B4D; /* write kernel keycode table entry */ 36enum {
37 KDSETKEYCODE = 0x4B4D /* write kernel keycode table entry */
38};
37 39
38extern int 40extern int
39setkeycodes_main(int argc, char** argv) 41setkeycodes_main(int argc, char** argv)