search for: __noreturn

Displaying 20 results from an estimated 39 matches for "__noreturn".

2008 Sep 05
0
initial mntent.h, mount features, ipconfig fixes
...he kernel view first. may be interchanged again later.. Signed-off-by: maximilian attems <max at stro.at> diff --git a/usr/utils/mount_main.c b/usr/utils/mount_main.c index 89e75d7..ee08720 100644 --- a/usr/utils/mount_main.c +++ b/usr/utils/mount_main.c @@ -31,9 +31,9 @@ static __noreturn print_mount(char *type) FILE *mfp; struct mntent *mnt; - mfp = setmntent(_PATH_MOUNTED, "r"); + mfp = setmntent(_PATH_PROC_MOUNTS, "r"); if (!mfp) - mfp = setmntent(_PATH_PROC_MOUNTS, "r"); + mfp = setmntent(_PATH_MOUNTED, "r"); if (!mfp) perro...
2008 Sep 07
1
[git pull v2] initial mntent.h, mount features, ipconfig fixes
...he kernel view first. may be interchanged again later.. Signed-off-by: maximilian attems <max at stro.at> diff --git a/usr/utils/mount_main.c b/usr/utils/mount_main.c index 89e75d7..ee08720 100644 --- a/usr/utils/mount_main.c +++ b/usr/utils/mount_main.c @@ -31,9 +31,9 @@ static __noreturn print_mount(char *type) FILE *mfp; struct mntent *mnt; - mfp = setmntent(_PATH_MOUNTED, "r"); + mfp = setmntent(_PATH_PROC_MOUNTS, "r"); if (!mfp) - mfp = setmntent(_PATH_PROC_MOUNTS, "r"); + mfp = setmntent(_PATH_MOUNTED, "r"); if (!mfp) perro...
2014 Jan 25
0
[klibc:master] auxv: convert auxiliary vector into an array; define getauxval()
...ed from __static_init.c or __shared_init.c */ @@ -35,12 +36,14 @@ char **environ; unsigned int __page_size, __page_shift; struct auxentry { - uintptr_t type; - uintptr_t v; + unsigned long type; + unsigned long v; }; extern void __init_stdio(void); +unsigned long __auxval[_AUXVAL_MAX]; + __noreturn __libc_init(uintptr_t * elfdata, void (*onexit) (void)) { int argc; @@ -76,20 +79,16 @@ __noreturn __libc_init(uintptr_t * elfdata, void (*onexit) (void)) auxentry = (struct auxentry *)(envend + 1); while (auxentry->type) { - switch (auxentry->type) { -#if SHARED - case AT_ENTRY: -...
2014 Apr 09
0
[klibc:master] Move architecture-specific initialization to arch/
.../* This file is included from __static_init.c or __shared_init.c */ @@ -40,7 +41,8 @@ struct auxentry { unsigned long v; }; -extern void __init_stdio(void); +extern void __libc_init_stdio(void); +extern void __libc_archinit(void); unsigned long __auxval[_AUXVAL_MAX]; @@ -90,20 +92,11 @@ __noreturn __libc_init(uintptr_t * elfdata, void (*onexit) (void)) __page_size = page_size = __auxval[AT_PAGESZ]; -#ifdef __i386__ - { - extern void (*__syscall_entry)(int, ...); - if (__auxval[AT_SYSINFO]) - __syscall_entry = (void (*)(int, ...)) - __auxval[AT_SYSINFO]; - } -#endif - #if __GNUC...
2015 Sep 20
1
[syslinux:master] com32/modules: Split build by architecture. Add dir.c32
On Sun, Sep 20, 2015 at 8:33 AM, syslinux-bot for Gene Cumm <gene.cumm at gmail.com> wrote: > Commit-ID: e0ac1d2fdf7d7c58457f3796a12561cce95ca29f > Gitweb: http://www.syslinux.org/commit/e0ac1d2fdf7d7c58457f3796a12561cce95ca29f > Author: Gene Cumm <gene.cumm at gmail.com> > AuthorDate: Sun, 20 Sep 2015 08:30:55 -0400 > Committer: Gene Cumm <gene.cumm at
2007 Aug 24
2
[git patch] klibc bzero, mount fixes + random stuff
...nvp usage makes main() more familiar ;) Signed-off-by: maximlian attems <max at stro.at> diff --git a/usr/kinit/resume/resume.c b/usr/kinit/resume/resume.c index 80099f9..2138078 100644 --- a/usr/kinit/resume/resume.c +++ b/usr/kinit/resume/resume.c @@ -15,7 +15,7 @@ static __noreturn usage(void) exit(1); } -int main(int argc, char *argv[], char *envp[]) +int main(int argc, char *argv[]) { progname = argv[0]; if (argc < 2 || argc > 3) diff --git a/usr/utils/kill.c b/usr/utils/kill.c index 8e68faa..188f1b5 100644 --- a/usr/utils/kill.c +++ b/usr/utils/kill.c @@ -1...
2016 Jan 06
0
[klibc:master] readlink: Add -f option
...usr/utils/readlink.c | 29 +++++++++++++++++++++++++---- 1 file changed, 25 insertions(+), 4 deletions(-) diff --git a/usr/utils/readlink.c b/usr/utils/readlink.c index 4e3cfcb..ffb0b1f 100644 --- a/usr/utils/readlink.c +++ b/usr/utils/readlink.c @@ -7,24 +7,45 @@ const char *progname; static __noreturn usage(void) { - fprintf(stderr, "Usage: %s link...\n", progname); + fprintf(stderr, "Usage: %s [-f] link...\n", progname); exit(1); } int main(int argc, char *argv[]) { + int c, f_flag = 0; const char *name; char link_name[PATH_MAX]; int rv; int i; - progname =...
2019 Jan 18
0
[klibc:master] mount_main: Fix empty string check
...chings <ben at decadent.org.uk> --- usr/utils/mount_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr/utils/mount_main.c b/usr/utils/mount_main.c index ab3cb71..0d299c4 100644 --- a/usr/utils/mount_main.c +++ b/usr/utils/mount_main.c @@ -43,9 +43,9 @@ static __noreturn print_mount(char *type) if (type && mnt->mnt_type && strcmp(type, mnt->mnt_type)) continue; printf("%s on %s", mnt->mnt_fsname, mnt->mnt_dir); - if (mnt->mnt_type != NULL && mnt->mnt_type != '\0') + if (mnt->mnt_type != NULL...
2007 Jul 20
1
reboot from com32
Q: Is there a way to do a reboot (either warm or cold) from a com32 program? I have a com32 program that sometimes (based upon conditions) needs to reboot the system. I would prefer to do a warm reboot (40:72 = 0x1234), but at this point cold would be OK too. grepping through syslinux-3.51 I only found one reference, in iso/pxelinux.asm at the tail end of 'kaboom' ... but presumably
2006 Aug 24
0
[patch] mkdir use and add usage
...age function and calls to it. Signed-off-by: maximilian attems <maks at sternwelten.at> diff --git a/usr/utils/mkdir.c b/usr/utils/mkdir.c index 1275472..af241ef 100644 --- a/usr/utils/mkdir.c +++ b/usr/utils/mkdir.c @@ -15,6 +15,12 @@ static int p_flag; char *progname; +static __noreturn usage(void) +{ + fprintf(stderr, "Usage: %s [-p] [-m mode] dir...\n", progname); + exit(1); +} + static int make_one_dir(char *dir, mode_t mode) { struct stat stbuf; @@ -131,14 +137,12 @@ int main(int argc, char *argv[]) case '?': fprintf(stderr, "%s: invalid optio...
2014 Apr 15
0
[klibc:master] readlink: Handle multiple input arguments
...insertions(+), 11 deletions(-) diff --git a/usr/utils/readlink.c b/usr/utils/readlink.c index 8b620fd..bf9501b 100644 --- a/usr/utils/readlink.c +++ b/usr/utils/readlink.c @@ -3,11 +3,11 @@ #include <unistd.h> #include <sys/stat.h> -char *progname; +const char *progname; static __noreturn usage(void) { - fprintf(stderr, "Usage: %s link\n", progname); + fprintf(stderr, "Usage: %s link...\n", progname); exit(1); } @@ -16,19 +16,22 @@ int main(int argc, char *argv[]) const char *name; char link_name[PATH_MAX]; int rv; + int i; progname = *argv++; -...
2014 Apr 15
0
[klibc:master] readlink: Better buffer handling
...<hpa at linux.intel.com> --- usr/utils/readlink.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/usr/utils/readlink.c b/usr/utils/readlink.c index 5ea4e41..8b620fd 100644 --- a/usr/utils/readlink.c +++ b/usr/utils/readlink.c @@ -13,8 +13,9 @@ static __noreturn usage(void) int main(int argc, char *argv[]) { - char *name, *link_name = NULL; - size_t max_siz = 128; + const char *name; + char link_name[PATH_MAX]; + int rv; progname = *argv++; @@ -22,15 +23,12 @@ int main(int argc, char *argv[]) if (!name) usage(); - link_name = malloc(max_si...
2014 Sep 27
1
[PATCH 2/2] readlink: Add -f option
...lesystems in initramfs-tools. Signed-off-by: Ben Hutchings <ben at decadent.org.uk> --- initramfs-tools 0.117 only works with busybox; this should allow it to work with klibc again. Ben. --- a/usr/utils/readlink.c +++ b/usr/utils/readlink.c @@ -7,24 +7,45 @@ const char *progname; static __noreturn usage(void) { - fprintf(stderr, "Usage: %s link...\n", progname); + fprintf(stderr, "Usage: %s [-f] link...\n", progname); exit(1); } int main(int argc, char *argv[]) { + int c, f_flag = 0; const char *name; char link_name[PATH_MAX]; int rv; int i; - progname =...
2017 May 22
0
[PATCH] Add support for reboot syscall argument
...- return __reboot(LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2, flag, NULL); + return __reboot(LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2, flag, arg); } diff --git a/usr/utils/halt.c b/usr/utils/halt.c index eed0a46..c15b42a 100644 --- a/usr/utils/halt.c +++ b/usr/utils/halt.c @@ -6,7 +6,7 @@ static __noreturn usage(void) { - static char mesg[] = "Usage: {halt|reboot|poweroff} [-n]\n"; + static char mesg[] = "Usage: {halt|reboot|poweroff} [-n] [reboot-arg]\n"; write(2, mesg, sizeof(mesg) - 1); exit(1); } @@ -16,6 +16,7 @@ int main(int argc, char *argv[]) int cmd = 0; /* inital...
2014 Jan 25
0
[klibc:master] i386: use the vdso for system calls on i386
...ddress */ movl $__NR_vfork, %eax - int $0x80 + int $0x80 /* DO NOT call the vdso here! */ pushl %edx cmpl $-4095, %eax jae 1f diff --git a/usr/klibc/libc_init.c b/usr/klibc/libc_init.c index 1087f95..1c6180b 100644 --- a/usr/klibc/libc_init.c +++ b/usr/klibc/libc_init.c @@ -90,6 +90,15 @@ __noreturn __libc_init(uintptr_t * elfdata, void (*onexit) (void)) __page_size = page_size = __auxval[AT_PAGESZ]; +#ifdef __i386__ + { + extern void (*__syscall_entry)(int, ...); + if (__auxval[AT_SYSINFO]) + __syscall_entry = (void (*)(int, ...)) + __auxval[AT_SYSINFO]; + } +#endif + #if __GNUC...
2015 Oct 28
0
Isohybrid wiki page and UEFI
...core/fs/pxe -D__SYSLINUX_CORE__ -D__FIRMWARE_BIOS__ -I/root/syslinux/bios -DLDLINUX=\"ldlinux.c32\" -c -o kaboom.o /root/syslinux/core/kaboom.c So the CORE_DEBUG option is passed, and in the code I see: #if defined(CORE_DEBUG) || defined(DEBUG_PORT) #include <dprintf.h> __export __noreturn __bad_SEG(const volatile void *p) { dprintf("SEG() passed an invalid pointer: %p\n", p); kaboom(); } #endif So IIUC it should include that function if CORE_DEBUG is set to 1 no ? However: # nm ./bios/core/kaboom.o U call16 U kaboom 00000000 T _kaboom U zero...
2019 Jan 18
0
[klibc:master] Add support for reboot syscall argument
...- return __reboot(LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2, flag, NULL); + return __reboot(LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2, flag, arg); } diff --git a/usr/utils/halt.c b/usr/utils/halt.c index eed0a46..368f095 100644 --- a/usr/utils/halt.c +++ b/usr/utils/halt.c @@ -6,7 +6,7 @@ static __noreturn usage(void) { - static char mesg[] = "Usage: {halt|reboot|poweroff} [-n]\n"; + static char mesg[] = "Usage: {halt|reboot|poweroff} [-n] [reboot-arg]\n"; write(2, mesg, sizeof(mesg) - 1); exit(1); } @@ -16,6 +16,7 @@ int main(int argc, char *argv[]) int cmd = 0; /* inital...
2009 May 28
1
[PATCH] klibc-utils: add minils
Simple utility to list information about a files. The utility which does the same thing as "ls -la". This is a useful test program. Signed-off-by: Alexey Gladkov <gladkov.alexey at gmail.com> --- usr/utils/Kbuild | 4 +- usr/utils/minils.c | 198 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 201 insertions(+), 1 deletions(-) create mode 100644
2006 Jul 11
0
[rfc] standalone kinit/resume
...config.h> /* For CONFIG_PM_STD_PARTITION */ -#include "kinit.h" -#include "do_mounts.h" #include "resume.h" -#ifndef CONFIG_PM_STD_PARTITION -# define CONFIG_PM_STD_PARTITION "" -#endif +char *progname; -int do_resume(int argc, char *argv[]) +static __noreturn usage(void) { - const char *resume_file = CONFIG_PM_STD_PARTITION; - const char *resume_arg; - - resume_arg = get_arg(argc, argv, "resume="); - resume_file = resume_arg ? resume_arg : resume_file; - /* No resume device specified */ - if (!resume_file[0]) - return 0; - - /* Fix: we eithe...
2016 Jan 06
3
[PATCH klibc 0/3] Changes to support initramfs-tools 0.117
initramfs-tools version 0.117 requires 'readlink -f' and 'mount -o defaults' to work. The first two patches were previously submitted but not applied. Ben. Ben Hutchings (3): Implement realpath() readlink: Add -f option mount: Implement -o defaults usr/include/stdlib.h | 2 ++ usr/klibc/Kbuild | 2 +- usr/klibc/realpath.c | 49