search for: dev_stdcon_w

Displaying 20 results from an estimated 32 matches for "dev_stdcon_w".

2014 Jun 09
3
How to use --once? Does it work?
> On 06/08/2014 02:58 PM, Ady wrote: > >> > >> To be clear, I am not saying there is no bug - there might be. > >> > > > > I performed the following test with several versions of Syslinux: > > > > 1_ Execute: > > 'extlinux --once=non_default_label --install /mnt/sda1' ; > > 2_ In first reboot, the
2014 Jun 09
4
How to use --once? Does it work?
...t; Actually, it looks more like this might be the problem: > > Info: Symbol __muldi3 is defined more than once > Info: Symbol __divdi3 is defined more than once > Info: Symbol __udivmoddi4 is defined more than once > Info: Symbol __ashrdi3 is defined more than once > Info: Symbol dev_stdcon_w is defined more than once > Info: Symbol __moddi3 is defined more than once > Info: Symbol __syslinux_adv_ptr is defined more than once > Info: Symbol __negdi2 is defined more than once > Info: Symbol __umoddi3 is defined more than once > Info: Symbol __lshrdi3 is defined more than o...
2025 Apr 21
0
[PATCH] Improve EFI console logging
...ng to use it gives an undefined symbol error), though its behavior can thankfully be recreated pretty easily by just adding the following lines somewhere before you start using debugging statements with the printf() family of functions: close(1); close(2); opendev(&dev_null_r, &dev_stdcon_w, O_WRONLY); opendev(&dev_null_r, &dev_stdcon_w, O_WRONLY); I'm attaching a patch that updates the writechr() implementation for EFI by including a default color attribute of light gray on black, which matches what the BIOS implementation of writechr() does. The patch additionally...
2025 Apr 22
0
[PATCH] Improve EFI console logging
...ehavior can thankfully be recreated pretty easily by just >> adding the following lines somewhere before you start using debugging >> statements with the printf() family of functions: >> >> close(1); >> close(2); >> opendev(&dev_null_r, &dev_stdcon_w, O_WRONLY); >> opendev(&dev_null_r, &dev_stdcon_w, O_WRONLY); >> >> >> I'm attaching a patch that updates the writechr() implementation >> for EFI by including a default color attribute of light gray on black, >> which matches what the BIOS impl...
2007 Apr 26
2
boot 32 or 64 kernel depending on cpu
...gt; #include <ctype.h> #include <stdlib.h> #include <console.h> #include <cpuid.h> #include <syslinux/boot.h> int main(int argc, char *argv[]) { const char *kernel, *initrd; char cmdline[1024]; int i; unsigned p; s_cpu cpu; openconsole(&dev_stdcon_r, &dev_stdcon_w); if (argc < 5) { fprintf(stderr, "missing options, usage:\n" " l23or64 <32b kernel> <32b initrd> \\" " <64b kernel> <64b initrd> \\" " [kernel arguments]\n"); return 1; } detect_cpu(&cpu)...
2012 Nov 23
1
[PATCH] nictype.c32: PXELINUX module to display UNDI NIC bus type...
...", +}; + +static int usage(const char *prog); + +static const char prog_name[] = "nictype.c32"; + +int main(int argc, char **argv) +{ + int status; + t_PXENV_UNDI_GET_NIC_TYPE nic_type_info; + char filename[] = "VVVVDDDD"; + + openconsole(&dev_stdcon_r, &dev_stdcon_w); + + status = pxe_get_nic_type(&nic_type_info); + if (status == -1 || status != PXENV_STATUS_SUCCESS) { + fprintf(stderr, "pxe_get_nic_type failure\n"); + goto err_nic_type_info; + } + + /* Unknown NIC type? */ + if (nic_type_info.NicType >= Countof(nic_type_names))...
2010 Jul 01
2
[PATCH] ifplop.c32: Detect if PLoP USB/CD INT13h hook is enabled/disabled
...) + *q++ = c; + *q++ = ' '; + a = 1; + } + q -= a; + *q = '\0'; + + if (!str[0]) + syslinux_run_default(); + else + syslinux_run_command(str); +} + +int main(int argc, char *argv[]) +{ + char **args[2]; + int arg = 0; + + openconsole(&dev_null_r, &dev_stdcon_w); + + if (argc) + arg++; + args[0] = &argv[arg]; + args[1] = NULL; + while (arg < argc) { + if (!strcmp(argv[arg], "--")) { + argv[arg] = NULL; + args[1] = &argv[arg + 1]; + break; + } + arg++; + } + if (args[1] != NULL) { + boot_args(plop_INT13h_c...
2011 Apr 16
20
[PATCH 00/20] Switch to ELF modules
From: Matt Fleming <matt.fleming at linux.intel.com> This series fixes some bugs and switches the elflink branch to be entirely ELF modules. It applies on top of, http://syslinux.zytor.com/archives/2011-April/016369.html The deletions in the diff stat below are mainly from deleting com32/elflink/modules (finally!). Now there should be no duplicate code because we don't need COM32 and
2008 Aug 22
1
syslinux-3.71-21-gbd09a6d - build breakage
...d reference to `strtoul' ethersel.c:(.text+0x7a): undefined reference to `strtoul' ethersel.c:(.text+0x98): undefined reference to `strtoul' ethersel.c:(.text+0xbd): undefined reference to `strtoul' ethersel.o: In function `main': ethersel.c:(.text+0xee): undefined reference to `dev_stdcon_w' ethersel.c:(.text+0xf3): undefined reference to `dev_null_r' ethersel.c:(.text+0xf8): undefined reference to `openconsole' ethersel.c:(.text+0xfd): undefined reference to `pci_scan' ethersel.c:(.text+0x118): undefined reference to `__syslinux_config_file' ethersel.c:(.text+0x12...
2010 Jun 26
0
[MODULE] pwd
...X +# define PATH_MAX NAME_MAX +# elif FILENAME_MAX +# define PATH_MAX FILENAME_MAX +# else +# define PATH_MAX 256 +# endif /* NAME_MAX */ +#endif /* PATH_MAX */ + +int main(void) +{ + int rv = 0; + char pwd[PATH_MAX], *pwdptr; + + openconsole(&dev_rawcon_r, &dev_stdcon_w); + pwdptr = getcwd(pwd, PATH_MAX); + if (pwdptr) { + if (pwd[0] != 0) + puts(pwd); + else + puts("."); + } else { + rv = errno; + puts("ERROR: getcwd() returned NULL"); + } + return rv; +}
2014 Jun 09
0
How to use --once? Does it work?
...n > time (nor since). > Actually, it looks more like this might be the problem: Info: Symbol __muldi3 is defined more than once Info: Symbol __divdi3 is defined more than once Info: Symbol __udivmoddi4 is defined more than once Info: Symbol __ashrdi3 is defined more than once Info: Symbol dev_stdcon_w is defined more than once Info: Symbol __moddi3 is defined more than once Info: Symbol __syslinux_adv_ptr is defined more than once Info: Symbol __negdi2 is defined more than once Info: Symbol __umoddi3 is defined more than once Info: Symbol __lshrdi3 is defined more than once Info: Symbol __dtors_...
2014 Jun 10
0
How to use --once? Does it work?
...e this might be the problem: > > > > Info: Symbol __muldi3 is defined more than once > > Info: Symbol __divdi3 is defined more than once > > Info: Symbol __udivmoddi4 is defined more than once > > Info: Symbol __ashrdi3 is defined more than once > > Info: Symbol dev_stdcon_w is defined more than once > > Info: Symbol __moddi3 is defined more than once > > Info: Symbol __syslinux_adv_ptr is defined more than once > > Info: Symbol __negdi2 is defined more than once > > Info: Symbol __umoddi3 is defined more than once > > Info: Symbol __lshrd...
2004 Dec 08
4
malloc in libcom32 broken?
...erence to `__stack_size' make: *** [hello.elf] Error 1 Modified hello.c follows below: #include <stdlib.h> #include <string.h> #include <stdio.h> #include <console.h> int main(void) { char buffer[1024]; void *foo = malloc(1); openconsole(&dev_stdcon_r, &dev_stdcon_w); printf("Hello, World!\n"); for (;;) { printf("> "); fgets(buffer, sizeof buffer, stdin); if ( !strncmp(buffer, "exit", 4) ) break; printf(": %s", buffer); } return 0; }
2012 Sep 04
0
[PATCH] console: Close stdin, stdout, stderr on ldlinux.c32 unload
...xtern hexdump, mydump - extern printf_init - extern mem_init ; fs.c diff --git a/core/hello.c b/core/hello.c index d30fc3b..bed7cb5 100644 --- a/core/hello.c +++ b/core/hello.c @@ -76,8 +76,3 @@ void mp5(void) myprint(5); } -void printf_init(void) -{ - openconsole(&dev_null_r, &dev_stdcon_w); -} - diff --git a/core/init.c b/core/init.c index 01319f4..26b4a19 100644 --- a/core/init.c +++ b/core/init.c @@ -62,7 +62,6 @@ static inline void bios_timer_init(void) *hook = (uint32_t)&timer_irq; } -extern void printf_init(void); void init(com32sys_t *regs __unused) { int i; @@ -7...
2012 May 23
1
[GIT PULL] Remove duplicate COM32 modules
...*/ -#include <string.h> #include <stdio.h> -#include <console.h> +#include <stdlib.h> -int main(int argc, char *argv[]) -{ - int i; +#include "sort.h" + +#define NUM_COUNT 10 +#define MAX_NUM 100 - openconsole(&dev_stdcon_r, &dev_stdcon_w); +int main(int argc __unused, char **argv __unused) +{ + int *nums = NULL; - printf("Hello, World!\n"); + nums = malloc(NUM_COUNT * sizeof(int)); + printf("Hello, world, from 0x%08X! malloc return %p\n", (unsigned int)&main, nums); - for (i = 1; i < ar...
2010 Mar 18
1
argv[0] doesn't contain module name and cat.c32 hangs with Syslinux 4.00-pre36
...characters with "?" would even be better. A more.c32 module would also be useful. $ cat com32/modules/cat.c #include <stdio.h> #include <stdlib.h> #include <console.h> int main(int argc, char *argv[]) { FILE *f; int ch; openconsole(&dev_stdcon_r, &dev_stdcon_w); if (argc != 2) { fprintf(stderr, "Usage: cat.c32 filename\n"); return 1; } f = fopen(argv[1], "r"); if (!f) { fprintf(stderr, "File name \"%s\" does not exist.\n", argv[1]); return 1; } while ((ch = getc(f)) != EOF) putchar(c...
2019 Apr 05
2
Syslinux LUA -- output not visible in UEFI mode?
Hello all, We're having the following issue: when in UEFI mode, any output/errors from a lua script is invisible! This occurs even just running 'lua -v'. It runs and returns to a (visible) 'boot:' prompt, but there is simply no output visible from lua! (It does do a linefeed, but no visible text appears.) Has anyone encountered this? And/or know of a solution? For
2009 Feb 16
3
[PATCH] cmd.c32: new module to just execute a command
...cmd.c + * + * Execute arbitrary commands + */ + +#include <string.h> +#include <alloca.h> +#include <console.h> +#include <com32.h> + +int main(int argc, const char *argv[]) +{ + size_t len = 0; + char *cmd; + char *tmp; + int i; + + openconsole(&dev_stdcon_r, &dev_stdcon_w); + + for (i = 1; i < argc; i++) + len += strlen(argv[i]) + 1; + + tmp = cmd = alloca(len); + + for (i = 1; i < argc; i++) + tmp += sprintf(tmp, "%s%s", argv[i], (i == argc-1) ? "" : " "); + + syslinux_run_command(cmd); +} -- 1.5.4.3
2010 Jul 05
0
whichsys.c32: execute specific command, based on Syslinux bootloader variant
...n.c32 hd0 -sys- chain.c32 hd1 swap\n\ + whichsys.c32 -iso- config iso.cfg -sys- sys.cfg -pxe- pxe.cfg\n"; + fprintf(stderr, usage); +} + +int main(int argc, char *argv[]) +{ + const union syslinux_derivative_info *sdi; + + int arg = 0; + + openconsole(&dev_null_r, &dev_stdcon_w); + + /* If no argument got passed, let's show the usage */ + if (argc == 1) { + usage(); + return 0; + } + + arg++; + + while (arg < argc) { + if (!strcmp(argv[arg], "-iso-")) { + argv[arg] = NULL; + isolinux.arg[0] = &argv[arg + 1]; + isolin...
2009 Mar 31
0
enhanced config.c32 module
...void show_usage() { fprintf(stderr, "Usage: config <filename>\n"); fprintf(stderr, " config ext=<filename> iso=<filename> pxe=<filename> sys=<filename> \n"); } int main(int argc, const char *argv[]) { openconsole(&dev_null_r, &dev_stdcon_w); if (argc < 2) { fprintf(stderr, "No config file specified.\n\n"); show_usage(); return 1; } init_structs(); detect_parameters(argc,argv); if (detect_syslinux() == 1) { fprintf(stderr, "No valid bootloader found..\n\n"); show_usage(); retu...