From bc68cd14ccaebc17e7e03a08e51fddfb91007624 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Fri, 10 Mar 2006 19:22:06 +0000 Subject: Patch from Denis Vlasenko turning static const int (which gets emitted into the busybox binary) into enums (which don't). --- console-tools/chvt.c | 6 ++++-- console-tools/deallocvt.c | 2 +- console-tools/loadfont.c | 16 +++++++++------- console-tools/setkeycodes.c | 4 +++- 4 files changed, 17 insertions(+), 11 deletions(-) (limited to 'console-tools') 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 @@ #include "busybox.h" /* From */ -static const int VT_ACTIVATE = 0x5606; /* make vt active */ -static const int VT_WAITACTIVE = 0x5607; /* wait for vt active */ +enum { + VT_ACTIVATE = 0x5606, /* make vt active */ + VT_WAITACTIVE = 0x5607 /* wait for vt active */ +}; int chvt_main(int argc, char **argv) { 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 @@ #include "busybox.h" /* From */ -static const int VT_DISALLOCATE = 0x5608; /* free memory associated to vt */ +enum { VT_DISALLOCATE = 0x5608 }; /* free memory associated to vt */ int deallocvt_main(int argc, char *argv[]) { 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 @@ #include #include "busybox.h" -static const int PSF_MAGIC1 = 0x36; -static const int PSF_MAGIC2 = 0x04; - -static const int PSF_MODE512 = 0x01; -static const int PSF_MODEHASTAB = 0x02; -static const int PSF_MAXMODE = 0x03; -static const int PSF_SEPARATOR = 0xFFFF; +enum{ + PSF_MAGIC1 = 0x36, + PSF_MAGIC2 = 0x04, + + PSF_MODE512 = 0x01, + PSF_MODEHASTAB = 0x02, + PSF_MAXMODE = 0x03, + PSF_SEPARATOR = 0xFFFF +}; struct psf_header { 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 @@ struct kbkeycode { unsigned int scancode, keycode; }; -static const int KDSETKEYCODE = 0x4B4D; /* write kernel keycode table entry */ +enum { + KDSETKEYCODE = 0x4B4D /* write kernel keycode table entry */ +}; extern int setkeycodes_main(int argc, char** argv) -- cgit v1.2.3