Add memtest support.
[syslinux-debian/hramrach.git] / com32 / cmenu / libmenu / syslnx.c
blob73ec2a7cbf3fc74b91c3b83f5a9dbda9b8ffe17c
1 /* -*- c -*- ------------------------------------------------------------- *
3 * Copyright 2004-2005 Murali Krishnan Ganapathy - All Rights Reserved
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, Inc., 53 Temple Place Ste 330,
8 * Boston MA 02111-1307, USA; either version 2 of the License, or
9 * (at your option) any later version; incorporated herein by reference.
11 * ----------------------------------------------------------------------- */
13 #include <string.h>
14 #include <com32.h>
15 #include <core.h>
16 #include <graphics.h>
17 #include "syslnx.h"
18 #include <syslinux/config.h>
19 #include <syslinux/video.h>
21 com32sys_t inreg, outreg; // Global registers for this module
23 void runsyslinuxcmd(const char *cmd)
25 char *bounce;
27 bounce = lmalloc(strlen(cmd) + 1);
28 if (!bounce)
29 return;
31 strcpy(bounce, cmd);
32 load_kernel(bounce);
35 void gototxtmode(void)
37 syslinux_force_text_mode();
40 void syslinux_idle(void)
42 __idle();
45 unsigned int getversion(char *deriv, unsigned int *numfun)
47 if (deriv)
48 *deriv = __syslinux_version.filesystem;
49 if (numfun)
50 *numfun = __syslinux_version.max_api;
51 return __syslinux_version.version;
54 char issyslinux(void)
56 return !!getversion(NULL, NULL);
59 void runsyslinuximage(const char *cmd, long ipappend)
61 (void)ipappend; // XXX: Unused?!
63 getversion(NULL, NULL);
64 runsyslinuxcmd(cmd);