source: bootcd/isolinux/syslinux-6.03/com32/cmenu/libmenu/syslnx.c @ 26ffad7

Last change on this file since 26ffad7 was e16e8f2, checked in by Edwin Eefting <edwin@datux.nl>, 3 years ago

bootstuff

  • Property mode set to 100644
File size: 1.5 KB
Line 
1/* -*- c -*- ------------------------------------------------------------- *
2 *
3 *   Copyright 2004-2005 Murali Krishnan Ganapathy - All Rights Reserved
4 *
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.
10 *
11 * ----------------------------------------------------------------------- */
12
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>
20
21com32sys_t inreg, outreg;       // Global registers for this module
22
23void runsyslinuxcmd(const char *cmd)
24{
25    char *bounce;
26
27    bounce = lmalloc(strlen(cmd) + 1);
28    if (!bounce)
29        return;
30
31    strcpy(bounce, cmd);
32    load_kernel(bounce);
33}
34
35void gototxtmode(void)
36{
37    syslinux_force_text_mode();
38}
39
40void syslinux_idle(void)
41{
42    __idle();
43}
44
45unsigned int getversion(char *deriv, unsigned int *numfun)
46{
47    if (deriv)
48        *deriv = __syslinux_version.filesystem;
49    if (numfun)
50        *numfun = __syslinux_version.max_api;
51    return __syslinux_version.version;
52}
53
54char issyslinux(void)
55{
56    return !!getversion(NULL, NULL);
57}
58
59void runsyslinuximage(const char *cmd, long ipappend)
60{
61    (void)ipappend;             // XXX: Unused?!
62
63    getversion(NULL, NULL);
64    runsyslinuxcmd(cmd);
65}
Note: See TracBrowser for help on using the repository browser.