Displaying 4 results from an estimated 4 matches for "clearcmdentry".
2020 Mar 28
0
[klibc:update-dash] dash: exec: Stricter pathopt parsing
...d:
1) cd(1) will always treat % characters as part of the path.
2) chkmail will continue to accept arbitrary pathopt.
3) find_dot_file will ignore the %builtin pathopt instead of trying
to do a stat in the accompanying directory (which is usually the
current directory).
The patch also removes the clearcmdentry optimisation where we
attempt to only partially flush the table where possible.
Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au>
Signed-off-by: Ben Hutchings <ben at decadent.org.uk>
---
usr/dash/cd.c | 2 +-
usr/dash/exec.c | 133 ++++++++++++++++++++++++++++++++++-----...
2020 Mar 28
0
[klibc:update-dash] dash: exec: Never rehash regular built-ins
...ind_command(char *name, struct cmdentry *entry, int act, const char *path)
bit = DO_NOFUNC;
break;
case CMDBUILTIN:
- bit = DO_ALTBLTIN;
+ bit = cmdp->param.cmd->flags & BUILTIN_REGULAR ?
+ 0 : DO_ALTBLTIN;
break;
}
if (act & bit) {
@@ -601,7 +604,9 @@ clearcmdentry(void)
pp = tblp;
while ((cmdp = *pp) != NULL) {
if (cmdp->cmdtype == CMDNORMAL ||
- (cmdp->cmdtype == CMDBUILTIN && builtinloc > 0)) {
+ (cmdp->cmdtype == CMDBUILTIN &&
+ !(cmdp->param.cmd->flags & BUILTIN_REGULAR) &&
+...
2019 Jan 25
0
[klibc:update-dash] [BUILTIN] command: allow combining -p with -v
...-off-by: Ben Hutchings <ben at decadent.org.uk>
---
usr/dash/exec.c | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/usr/dash/exec.c b/usr/dash/exec.c
index 79e20074..e56e3f67 100644
--- a/usr/dash/exec.c
+++ b/usr/dash/exec.c
@@ -96,7 +96,7 @@ STATIC void clearcmdentry(int);
STATIC struct tblentry *cmdlookup(const char *, int);
STATIC void delete_cmd_entry(void);
STATIC void addcmdentry(char *, struct cmdentry *);
-STATIC int describe_command(struct output *, char *, int);
+STATIC int describe_command(struct output *, char *, const char *, int);
/*
@@ -72...
2020 Mar 28
0
[klibc:update-dash] dash: [BUILTIN] command: allow combining -p with -v
...-off-by: Ben Hutchings <ben at decadent.org.uk>
---
usr/dash/exec.c | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/usr/dash/exec.c b/usr/dash/exec.c
index 79e20074..e56e3f67 100644
--- a/usr/dash/exec.c
+++ b/usr/dash/exec.c
@@ -96,7 +96,7 @@ STATIC void clearcmdentry(int);
STATIC struct tblentry *cmdlookup(const char *, int);
STATIC void delete_cmd_entry(void);
STATIC void addcmdentry(char *, struct cmdentry *);
-STATIC int describe_command(struct output *, char *, int);
+STATIC int describe_command(struct output *, char *, const char *, int);
/*
@@ -72...