search for: mkinit

Displaying 20 results from an estimated 25 matches for "mkinit".

Did you mean: kinit
2020 Mar 28
0
[klibc:update-dash] dash: mkinit: Split reset into exitreset and reset
...g/?p=libs/klibc/klibc.git;a=commit;h=7f799aacc75667708bafe8f4411891ec053d7d65 Author: Herbert Xu <herbert at gondor.apana.org.au> AuthorDate: Sat, 19 May 2018 02:39:40 +0800 Committer: Ben Hutchings <ben at decadent.org.uk> CommitDate: Sat, 28 Mar 2020 21:42:55 +0000 [klibc] dash: mkinit: Split reset into exitreset and reset [ dash commit 983085923ae1d45196868b48f576b1a19e03e72b ] Previously reset was called after exitshell. This was changed so that it was called before exitshell because certain state needed to be reset in order for the EXIT trap to work. However, this caused i...
2003 Nov 29
1
[PATCH] ash not make -j safe, make spotless updates
...2003-11-29 13:16:57.000000000 +0100 @@ -12,6 +12,9 @@ OBJ2 = builtins.o cd.o dirent.o bltin/ec OBJS = $(OBJ1) $(OBJ2) +OBJ_NODES = cd.o eval.o exec.o expand.o jobs.o main.o nodes.o options.o parser.o redir.o show.o trap.o var.o + + SRCROOT = .. include ../MCONFIG @@ -63,6 +66,8 @@ init.c: mkinit $(SRCS) mkinit: mkinit.c $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) mkinit.c -o $@ $(HOST_LIBS) +$(OBJ_NODES): nodes.h + nodes.h: mknodes nodetypes nodes.c.pat ./mknodes nodetypes nodes.c.pat @@ -73,7 +78,7 @@ mknodes: mknodes.c $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) mknodes.c -o $@ $...
2019 Jan 25
0
[klibc:update-dash] input: Move all input state into parsefile
...files changed, 67 insertions(+), 73 deletions(-) diff --git a/usr/dash/input.c b/usr/dash/input.c index 232bb9c4..6223a735 100644 --- a/usr/dash/input.c +++ b/usr/dash/input.c @@ -61,38 +61,7 @@ #define EOF_NLEFT -99 /* value of parsenleft when EOF pushed back */ #define IBUFSIZ (BUFSIZ + 1) -MKINIT -struct strpush { - struct strpush *prev; /* preceding string on stack */ - char *prevstring; - int prevnleft; - struct alias *ap; /* if push was associated with an alias */ - char *string; /* remember the string since it may change */ -}; -/* - * The parsefile structure pointed to by the global...
2020 Mar 28
0
[klibc:update-dash] dash: input: Move all input state into parsefile
...files changed, 67 insertions(+), 73 deletions(-) diff --git a/usr/dash/input.c b/usr/dash/input.c index 232bb9c4..6223a735 100644 --- a/usr/dash/input.c +++ b/usr/dash/input.c @@ -61,38 +61,7 @@ #define EOF_NLEFT -99 /* value of parsenleft when EOF pushed back */ #define IBUFSIZ (BUFSIZ + 1) -MKINIT -struct strpush { - struct strpush *prev; /* preceding string on stack */ - char *prevstring; - int prevnleft; - struct alias *ap; /* if push was associated with an alias */ - char *string; /* remember the string since it may change */ -}; -/* - * The parsefile structure pointed to by the global...
2020 Mar 28
0
[klibc:update-dash] dash: var: Set IFS to fixed value at start time
...en Hutchings <ben at decadent.org.uk> --- usr/dash/var.c | 11 ++--------- usr/dash/var.h | 6 +----- 2 files changed, 3 insertions(+), 14 deletions(-) diff --git a/usr/dash/var.c b/usr/dash/var.c index cc6f7f2a..604ab1f7 100644 --- a/usr/dash/var.c +++ b/usr/dash/var.c @@ -75,11 +75,7 @@ MKINIT struct localvar_list *localvar_stack; const char defpathvar[] = "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"; -#ifdef IFS_BROKEN -const char defifsvar[] = "IFS= \t\n"; -#else -const char defifs[] = " \t\n"; -#endif +char defifsvar[] = "...
2004 Jan 27
1
[PATCH] ash make deps
...04-01-27 13:44:34.000000000 +0000 @@ -13,6 +13,7 @@ OBJ2 = builtins.o cd.o dirent.o bltin/ec OBJS = $(OBJ1) $(OBJ2) OBJ_NODES = cd.o eval.o exec.o expand.o jobs.o main.o nodes.o options.o parser.o redir.o show.o trap.o var.o +OBJ_BUILTINS = b.o eval.o exec.o SRCROOT = .. @@ -68,6 +69,8 @@ mkinit: mkinit.c $(OBJ_NODES): nodes.h +$(OBJ_BUILTINS): builtins.h + nodes.h: mknodes nodetypes nodes.c.pat ./mknodes nodetypes nodes.c.pat -- USB is for mice, FireWire is for men! sUse lINUX ag, n?RNBERG
2005 Dec 13
2
Parallel build of dash still fails
Building dash in parallel still fails: GEN dash/builtins.def HOSTCC dash/mkinit HOSTCC dash/mknodes HOSTCC dash/mksignames HOSTCC dash/mksyntax dash/mksignames.c:59: warning: function declaration isn?t a prototype dash/mksignames.c:365: warning: function declaration isn?t a prototype dash/mksignames.c:386: warning: function declaration isn?t a prototype KLIBCCC...
2019 Jan 25
0
[klibc:update-dash] [SHELL] Optimize dash -c "command" to avoid a fork
...-65,10 +65,6 @@ #endif -/* flags in argument to evaltree */ -#define EV_EXIT 01 /* exit after evaluating tree */ -#define EV_TESTED 02 /* exit status is checked; ignore -e flag */ - int evalskip; /* set if we are skipping commands */ STATIC int skipcount; /* number of levels to skip */ MKINIT int loopnest; /* current loop nesting level */ @@ -169,7 +165,7 @@ evalstring(char *s, int flags) status = 0; while ((n = parsecmd(0)) != NEOF) { - evaltree(n, flags); + evaltree(n, flags & ~(parser_eof() ? 0 : EV_EXIT)); status = exitstatus; popstackmark(&smark); if (eval...
2020 Mar 28
0
[klibc:update-dash] dash: [SHELL] Optimize dash -c "command" to avoid a fork
...-65,10 +65,6 @@ #endif -/* flags in argument to evaltree */ -#define EV_EXIT 01 /* exit after evaluating tree */ -#define EV_TESTED 02 /* exit status is checked; ignore -e flag */ - int evalskip; /* set if we are skipping commands */ STATIC int skipcount; /* number of levels to skip */ MKINIT int loopnest; /* current loop nesting level */ @@ -169,7 +165,7 @@ evalstring(char *s, int flags) status = 0; while ((n = parsecmd(0)) != NEOF) { - evaltree(n, flags); + evaltree(n, flags & ~(parser_eof() ? 0 : EV_EXIT)); status = exitstatus; popstackmark(&smark); if (eval...
2007 Aug 23
0
[git patch] klibc dash 0.5.4 update
...t.c | 3 usr/dash/config.h | 6 - usr/dash/eval.c | 21 ++--- usr/dash/exec.c | 7 + usr/dash/expand.c | 2 usr/dash/input.c | 11 -- usr/dash/jobs.c | 14 +-- usr/dash/memalloc.h | 2 usr/dash/mkbuiltins | 2 usr/dash/mkinit.c | 9 +- usr/dash/parser.c | 1 usr/dash/parser.h | 2 usr/dash/redir.c | 144 +++++++++++++++++++++----------------- usr/dash/redir.h | 4 - usr/dash/trap.c | 9 +- 17 files changed, 137 insertions(+), 134 deletions(-) the merge was promp...
2019 Jan 25
0
[klibc:update-dash] [VAR] Use setvareq to set OPTIND initially
...+++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/usr/dash/var.c b/usr/dash/var.c index fa248544..cc6f7f2a 100644 --- a/usr/dash/var.c +++ b/usr/dash/var.c @@ -80,6 +80,7 @@ const char defifsvar[] = "IFS= \t\n"; #else const char defifs[] = " \t\n"; #endif +MKINIT char defoptindvar[] = "OPTIND=1"; int lineno; char linenovar[sizeof("LINENO=")+sizeof(int)*CHAR_BIT/3+1] = "LINENO="; @@ -100,7 +101,7 @@ struct var varinit[] = { { 0, VSTRFIXED|VTEXTFIXED, "PS1=$ ", 0 }, { 0, VSTRFIXED|VTEXTFIXED, "PS2=> &q...
2019 Jan 25
0
[klibc:update-dash] input: Make preadbuffer static
...ash/input.c index f11ac842..aa5dcfcf 100644 --- a/usr/dash/input.c +++ b/usr/dash/input.c @@ -109,6 +109,7 @@ EditLine *el; /* cookie for editline package */ STATIC void pushfile(void); static int preadfd(void); static void setinputfd(int fd, int push); +static int preadbuffer(void); #ifdef mkinit INCLUDE <stdio.h> @@ -222,8 +223,7 @@ retry: * 4) Process input up to the next newline, deleting nul characters. */ -int -preadbuffer(void) +static int preadbuffer(void) { char *q; int more; diff --git a/usr/dash/input.h b/usr/dash/input.h index 775291b8..90ff6c33 100644 --- a/usr...
2019 Jan 25
0
[klibc:update-dash] trap: Implement POSIX.1-2008 trap reset behaviour
...nsertions(+), 7 deletions(-) diff --git a/usr/dash/trap.c b/usr/dash/trap.c index a6997d4f..89ceff4f 100644 --- a/usr/dash/trap.c +++ b/usr/dash/trap.c @@ -78,6 +78,8 @@ volatile sig_atomic_t pendingsigs; /* received SIGCHLD */ int gotsigchld; +static int decode_signum(const char *); + #ifdef mkinit INCLUDE "trap.h" INIT { @@ -111,7 +113,7 @@ trapcmd(int argc, char **argv) } return 0; } - if (!ap[1]) + if (!ap[1] || decode_signum(*ap) >= 0) action = NULL; else action = *ap++; @@ -399,18 +401,27 @@ out: /* NOTREACHED */ } -int decode_signal(const char *string...
2020 Mar 28
0
[klibc:update-dash] dash: [VAR] Use setvareq to set OPTIND initially
...+++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/usr/dash/var.c b/usr/dash/var.c index fa248544..cc6f7f2a 100644 --- a/usr/dash/var.c +++ b/usr/dash/var.c @@ -80,6 +80,7 @@ const char defifsvar[] = "IFS= \t\n"; #else const char defifs[] = " \t\n"; #endif +MKINIT char defoptindvar[] = "OPTIND=1"; int lineno; char linenovar[sizeof("LINENO=")+sizeof(int)*CHAR_BIT/3+1] = "LINENO="; @@ -100,7 +101,7 @@ struct var varinit[] = { { 0, VSTRFIXED|VTEXTFIXED, "PS1=$ ", 0 }, { 0, VSTRFIXED|VTEXTFIXED, "PS2=> &q...
2020 Mar 28
0
[klibc:update-dash] dash: input: Make preadbuffer static
...ash/input.c index f11ac842..aa5dcfcf 100644 --- a/usr/dash/input.c +++ b/usr/dash/input.c @@ -109,6 +109,7 @@ EditLine *el; /* cookie for editline package */ STATIC void pushfile(void); static int preadfd(void); static void setinputfd(int fd, int push); +static int preadbuffer(void); #ifdef mkinit INCLUDE <stdio.h> @@ -222,8 +223,7 @@ retry: * 4) Process input up to the next newline, deleting nul characters. */ -int -preadbuffer(void) +static int preadbuffer(void) { char *q; int more; diff --git a/usr/dash/input.h b/usr/dash/input.h index 775291b8..90ff6c33 100644 --- a/usr...
2020 Mar 28
0
[klibc:update-dash] dash: trap: Implement POSIX.1-2008 trap reset behaviour
...nsertions(+), 7 deletions(-) diff --git a/usr/dash/trap.c b/usr/dash/trap.c index a6997d4f..89ceff4f 100644 --- a/usr/dash/trap.c +++ b/usr/dash/trap.c @@ -78,6 +78,8 @@ volatile sig_atomic_t pendingsigs; /* received SIGCHLD */ int gotsigchld; +static int decode_signum(const char *); + #ifdef mkinit INCLUDE "trap.h" INIT { @@ -111,7 +113,7 @@ trapcmd(int argc, char **argv) } return 0; } - if (!ap[1]) + if (!ap[1] || decode_signum(*ap) >= 0) action = NULL; else action = *ap++; @@ -399,18 +401,27 @@ out: /* NOTREACHED */ } -int decode_signal(const char *string...
2004 Oct 16
1
181 and current Linus
...9: undefined reference to `cpu_to_be32' fstype.o(.text+0xe5):/home/dri/klibc-0.181/utils/fstype.c:99: undefined reference to `cpu_to_be32' make: *** [static/fstype] Error 1 rm dd.o fstype.o chroot.o [jonsmirl@smirl utils]$ [jonsmirl@smirl ash]$ make sh mknodes.sh nodetypes nodes.c.pat . sh mkinit.sh arith.c arith_lex.c builtins.c cd.c echo.c error.c eval.c exec.c expand.c input.c jobs.c main.c memalloc.c miscbltin.c mystring.c nodes.c options.c parser.c redir.c show.c syntax.c trap.c output.c var.c test.c make: *** [init.c] Segmentation fault [jonsmirl@smirl ash]$ ===== Jon Smirl jonsmir...
2019 Jan 25
0
[klibc:update-dash] [PARSER] Simplify EOF/newline handling in list parser
...if (heredoclist) - parseheredoc(); tokpushback++; - return n1; + /* fall through */ + case TBACKGND: + case TSEMI: + break; default: - if (nlflag == 1) + if ((nlflag & 1)) synexpect(-1); tokpushback++; return n1; @@ -1443,10 +1439,6 @@ parsearith: { #ifdef mkinit INCLUDE "parser.h" -RESET { - tokpushback = 0; - checkkwd = 0; -} #endif
2020 Mar 28
0
[klibc:update-dash] dash: [PARSER] Simplify EOF/newline handling in list parser
...if (heredoclist) - parseheredoc(); tokpushback++; - return n1; + /* fall through */ + case TBACKGND: + case TSEMI: + break; default: - if (nlflag == 1) + if ((nlflag & 1)) synexpect(-1); tokpushback++; return n1; @@ -1443,10 +1439,6 @@ parsearith: { #ifdef mkinit INCLUDE "parser.h" -RESET { - tokpushback = 0; - checkkwd = 0; -} #endif
2020 Mar 28
0
[klibc:update-dash] dash: redir: Handle nested exec within REALLY_CLOSED redirection
...b/usr/dash/redir.c @@ -57,7 +57,6 @@ #include "error.h" -#define REALLY_CLOSED -3 /* fd that was closed and still is */ #define EMPTY -2 /* marks an unused slot in redirtab */ #define CLOSED -1 /* fd opened for redir needs to be closed */ @@ -77,6 +76,9 @@ struct redirtab { MKINIT struct redirtab *redirlist; +/* Bit map of currently closed file descriptors. */ +static unsigned closed_redirs; + STATIC int openredirect(union node *); #ifdef notyet STATIC void dupredirect(union node *, int, char[10]); @@ -86,6 +88,20 @@ STATIC void dupredirect(union node *, int); STATIC i...