Messages in this thread Patch in this message |  | | From | lilo <> | Date | Mon, 13 May 1996 02:15:35 -0500 (CDT) | Subject | Updated /proc/animal patch for Greased Platypus doing Prozac (this is so important ;) |
| |
Hi all,
I noticed that kernel versions x.99.x are not covered in the highly-systematic zoologically-based designator program for Linux kernels. Needless to say, this will never do.
I've added an additional value. x.99.x kernels are now designated Platypus kernels, an awkward creature highly-suited to the transitional kernel environment. With this change, for the pre2.0.2 kernel we get:
# uname -a Linux LiONS.reSEQ.UNGOV 1.99.2 #1-pre-2.0 Sun May 12 19:22:57 CDT 1996 i486
# cat /proc/animal Greased Platypus doing Prozac
Patch enclosed.
--lilo
--- linux/fs/proc/array.c Tue Apr 30 05:09:45 1996 +++ linux/fs/proc/array.c.NEW Sun May 12 18:50:01 1996 @@ -25,6 +25,9 @@ * * Bruno Haible : remove 4K limit for the maps file * <haible@ma2s2.mathematik.uni-karlsruhe.de> + * + * Joel Maslak : Added animal extension. + * <j@pobox.com> */ #include <linux/types.h> @@ -43,6 +46,8 @@ #include <linux/mm.h> #include <linux/pagemap.h> #include <linux/swap.h> +#include <linux/version.h> +#include <linux/animal.h> #include <asm/segment.h> #include <asm/pgtable.h> @@ -187,6 +192,13 @@ nr_running, nr_tasks, last_pid); } +static int get_animal(char * buffer) +{ + return sprintf(buffer, "%s %s %s %s\n", GET_ANIMAL_VERSION, + GET_ANIMAL_PATCHLEVEL, GET_ANIMAL_SUBLEVEL0, + GET_ANIMAL_SUBLEVEL1); +} + static int get_kstat(char * buffer) { int i, len; @@ -1044,6 +1056,9 @@ #endif case PROC_LOCKS: return get_locks_status(page); + + case PROC_ANIMAL: + return get_animal(page); } return -EBADF; } --- linux/fs/proc/root.c Tue Apr 30 05:09:45 1996 +++ linux/fs/proc/root.c.NEW Sun May 12 18:50:02 1996 @@ -293,6 +293,10 @@ S_IFLNK | S_IRUGO | S_IWUGO | S_IXUGO, 1, 0, 0, 64, &proc_self_inode_operations, }); + proc_register(&proc_root, &(struct proc_dir_entry) { + PROC_ANIMAL, 6, "animal", + S_IFREG | S_IRUGO, 1, 0, 0, + }); proc_register(&proc_root, &proc_net); proc_register(&proc_root, &proc_scsi); proc_register(&proc_root, &proc_sys_root); --- linux/include/linux/animal.h Sun May 12 18:50:02 1996 +++ linux/include/linux/animal.h.NEW Sun May 12 18:50:02 1996 @@ -0,0 +1,135 @@ +/* + * /proc/animal header file + * Joel C. Maslak, 1996, j@pobox.com + * + * Idea from: Andrew Esh + */ + +#define GET_ANIMAL_INTERNAL_1 ( LINUX_VERSION_CODE / 65536) +#define GET_ANIMAL_INTERNAL_2 ((LINUX_VERSION_CODE % 65536) / 256) +#define GET_ANIMAL_INTERNAL_3 ((LINUX_VERSION_CODE % 256) / 16) +#define GET_ANIMAL_INTERNAL_4 ( LINUX_VERSION_CODE % 16) + +#if GET_ANIMAL_INTERNAL_1 == 1 +# define GET_ANIMAL_VERSION "Greased" +#elif GET_ANIMAL_INTERNAL_1 == 2 +# define GET_ANIMAL_VERSION "Turbocharged" +#elif GET_ANIMAL_INTERNAL_1 == 3 +# define GET_ANIMAL_VERSION "Supercharged" +#elif GET_ANIMAL_INTERNAL_1 == 4 +# define GET_ANIMAL_VERSION "Stealthy" +#elif GET_ANIMAL_INTERNAL_1 == 5 +# define GET_ANIMAL_VERSION "Electrified" +#elif GET_ANIMAL_INTERNAL_1 == 6 +# define GET_ANIMAL_VERSION "Tired" +#elif GET_ANIMAL_INTERNAL_1 == 7 +# define GET_ANIMAL_VERSION "Crazy" +#elif GET_ANIMAL_INTERNAL_1 == 8 +# define GET_ANIMAL_VERSION "Dyslexic" +#elif GET_ANIMAL_INTERNAL_1 == 9 +# define GET_ANIMAL_VERSION "Unbeatable" +#else +# define GET_ANIMAL_VERSION "Unknown" +#endif + + +#if GET_ANIMAL_INTERNAL_2 == 0 +# define GET_ANIMAL_PATCHLEVEL "Chicken" +#elif GET_ANIMAL_INTERNAL_2 == 1 +# define GET_ANIMAL_PATCHLEVEL "GroundHog" +#elif GET_ANIMAL_INTERNAL_2 == 2 +# define GET_ANIMAL_PATCHLEVEL "Ostrich" +#elif GET_ANIMAL_INTERNAL_2 == 3 +# define GET_ANIMAL_PATCHLEVEL "HedgeHog" +#elif GET_ANIMAL_INTERNAL_2 == 4 +# define GET_ANIMAL_PATCHLEVEL "Penguin" +#elif GET_ANIMAL_INTERNAL_2 == 5 +# define GET_ANIMAL_PATCHLEVEL "Kitten" +#elif GET_ANIMAL_INTERNAL_2 == 6 +# define GET_ANIMAL_PATCHLEVEL "Owl" +#elif GET_ANIMAL_INTERNAL_2 == 7 +# define GET_ANIMAL_PATCHLEVEL "Shrew" +#elif GET_ANIMAL_INTERNAL_2 == 8 +# define GET_ANIMAL_PATCHLEVEL "Rabbit" +#elif GET_ANIMAL_INTERNAL_2 == 9 +# define GET_ANIMAL_PATCHLEVEL "Hawk" +#elif GET_ANIMAL_INTERNAL_2 == 99 +# define GET_ANIMAL_PATCHLEVEL "Platypus" +#else +# define GET_ANIMAL_PATCHLEVEL "Unknown" +#endif + + +#if GET_ANIMAL_INTERNAL_3 == 0 +# define GET_ANIMAL_SUBLEVEL0 "doing" +#elif GET_ANIMAL_INTERNAL_3 == 1 +# define GET_ANIMAL_SUBLEVEL0 "selling" +#elif GET_ANIMAL_INTERNAL_3 == 2 +# define GET_ANIMAL_SUBLEVEL0 "felling the effects of" +#elif GET_ANIMAL_INTERNAL_3 == 3 +# define GET_ANIMAL_SUBLEVEL0 "spewing" +#elif GET_ANIMAL_INTERNAL_3 == 4 +# define GET_ANIMAL_SUBLEVEL0 "needing" +#elif GET_ANIMAL_INTERNAL_3 == 5 +# define GET_ANIMAL_SUBLEVEL0 "buying" +#elif GET_ANIMAL_INTERNAL_3 == 6 +# define GET_ANIMAL_SUBLEVEL0 "handing out" +#elif GET_ANIMAL_INTERNAL_3 == 7 +# define GET_ANIMAL_SUBLEVEL0 "whining for" +#elif GET_ANIMAL_INTERNAL_3 == 8 +# define GET_ANIMAL_SUBLEVEL0 "looking for" +#elif GET_ANIMAL_INTERNAL_3 == 9 +# define GET_ANIMAL_SUBLEVEL0 "on" +#elif GET_ANIMAL_INTERNAL_3 == 10 +# define GET_ANIMAL_SUBLEVEL0 "abusing" +#elif GET_ANIMAL_INTERNAL_3 == 11 +# define GET_ANIMAL_SUBLEVEL0 "missing" +#elif GET_ANIMAL_INTERNAL_3 == 12 +# define GET_ANIMAL_SUBLEVEL0 "wanting" +#elif GET_ANIMAL_INTERNAL_3 == 13 +# define GET_ANIMAL_SUBLEVEL0 "seeing" +#elif GET_ANIMAL_INTERNAL_3 == 14 +# define GET_ANIMAL_SUBLEVEL0 "imagining" +#elif GET_ANIMAL_INTERNAL_3 == 15 +# define GET_ANIMAL_SUBLEVEL0 "remembering" +#else +# define GET_ANIMAL_SUBLEVEL0 "Unknown" +#endif + + +#if GET_ANIMAL_INTERNAL_4 == 0 +# define GET_ANIMAL_SUBLEVEL1 "LSD" +#elif GET_ANIMAL_INTERNAL_4 == 1 +# define GET_ANIMAL_SUBLEVEL1 "Quaaludes" +#elif GET_ANIMAL_INTERNAL_4 == 2 +# define GET_ANIMAL_SUBLEVEL1 "Prozac" +#elif GET_ANIMAL_INTERNAL_4 == 3 +# define GET_ANIMAL_SUBLEVEL1 "Pot" +#elif GET_ANIMAL_INTERNAL_4 == 4 +# define GET_ANIMAL_SUBLEVEL1 "Whiskey" +#elif GET_ANIMAL_INTERNAL_4 == 5 +# define GET_ANIMAL_SUBLEVEL1 "Steroids" +#elif GET_ANIMAL_INTERNAL_4 == 6 +# define GET_ANIMAL_SUBLEVEL1 "Warm Milk" +#elif GET_ANIMAL_INTERNAL_4 == 7 +# define GET_ANIMAL_SUBLEVEL1 "Hot Java" +#elif GET_ANIMAL_INTERNAL_4 == 8 +# define GET_ANIMAL_SUBLEVEL1 "Mountain Dew" +#elif GET_ANIMAL_INTERNAL_4 == 9 +# define GET_ANIMAL_SUBLEVEL1 "Jolt Cola" +#elif GET_ANIMAL_INTERNAL_4 == 10 +# define GET_ANIMAL_SUBLEVEL1 "Cocaine" +#elif GET_ANIMAL_INTERNAL_4 == 11 +# define GET_ANIMAL_SUBLEVEL1 "Dark Rum" +#elif GET_ANIMAL_INTERNAL_4 == 12 +# define GET_ANIMAL_SUBLEVEL1 "Endorphins" +#elif GET_ANIMAL_INTERNAL_4 == 13 +# define GET_ANIMAL_SUBLEVEL1 "Adrenaline" +#elif GET_ANIMAL_INTERNAL_4 == 14 +# define GET_ANIMAL_SUBLEVEL1 "Vitamins" +#elif GET_ANIMAL_INTERNAL_4 == 15 +# define GET_ANIMAL_SUBLEVEL1 "Nicotine" +#else +# define GET_ANIMAL_SUBLEVEL1 "Unknown" +#endif + --- linux/include/linux/proc_fs.h Sun May 12 14:31:21 1996 +++ linux/include/linux/proc_fs.h.NEW Sun May 12 18:50:02 1996 @@ -43,7 +43,8 @@ PROC_MTAB, PROC_MD, PROC_RTC, - PROC_LOCKS + PROC_LOCKS, + PROC_ANIMAL }; enum pid_directory_inos {
|  |