Blame SOURCES/glibc-rh2065588-11.patch
|
![](https://seccdn.libravatar.org/avatar/fcc0873d860f7e6944b3abea5b6b447609288dcd55d37b92d3e9e9b1a1e81f06?s=16&d=retro) |
28653a |
commit 5a5a3a3234bc220a5192d620e0cbc5360da46f14
|
|
![](https://seccdn.libravatar.org/avatar/fcc0873d860f7e6944b3abea5b6b447609288dcd55d37b92d3e9e9b1a1e81f06?s=16&d=retro) |
28653a |
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
|
|
![](https://seccdn.libravatar.org/avatar/fcc0873d860f7e6944b3abea5b6b447609288dcd55d37b92d3e9e9b1a1e81f06?s=16&d=retro) |
28653a |
Date: Tue Mar 24 15:40:36 2020 -0300
|
|
![](https://seccdn.libravatar.org/avatar/fcc0873d860f7e6944b3abea5b6b447609288dcd55d37b92d3e9e9b1a1e81f06?s=16&d=retro) |
28653a |
|
|
![](https://seccdn.libravatar.org/avatar/fcc0873d860f7e6944b3abea5b6b447609288dcd55d37b92d3e9e9b1a1e81f06?s=16&d=retro) |
28653a |
support/shell-container.c: Add builtin exit
|
|
![](https://seccdn.libravatar.org/avatar/fcc0873d860f7e6944b3abea5b6b447609288dcd55d37b92d3e9e9b1a1e81f06?s=16&d=retro) |
28653a |
|
|
![](https://seccdn.libravatar.org/avatar/fcc0873d860f7e6944b3abea5b6b447609288dcd55d37b92d3e9e9b1a1e81f06?s=16&d=retro) |
28653a |
Reviewed-by: DJ Delorie <dj@redhat.com>
|
|
![](https://seccdn.libravatar.org/avatar/fcc0873d860f7e6944b3abea5b6b447609288dcd55d37b92d3e9e9b1a1e81f06?s=16&d=retro) |
28653a |
|
|
![](https://seccdn.libravatar.org/avatar/fcc0873d860f7e6944b3abea5b6b447609288dcd55d37b92d3e9e9b1a1e81f06?s=16&d=retro) |
28653a |
diff --git a/support/shell-container.c b/support/shell-container.c
|
|
![](https://seccdn.libravatar.org/avatar/fcc0873d860f7e6944b3abea5b6b447609288dcd55d37b92d3e9e9b1a1e81f06?s=16&d=retro) |
28653a |
index e9eea64bca7e949d..aeaf6d2733abce61 100644
|
|
![](https://seccdn.libravatar.org/avatar/fcc0873d860f7e6944b3abea5b6b447609288dcd55d37b92d3e9e9b1a1e81f06?s=16&d=retro) |
28653a |
--- a/support/shell-container.c
|
|
![](https://seccdn.libravatar.org/avatar/fcc0873d860f7e6944b3abea5b6b447609288dcd55d37b92d3e9e9b1a1e81f06?s=16&d=retro) |
28653a |
+++ b/support/shell-container.c
|
|
![](https://seccdn.libravatar.org/avatar/fcc0873d860f7e6944b3abea5b6b447609288dcd55d37b92d3e9e9b1a1e81f06?s=16&d=retro) |
28653a |
@@ -135,6 +135,18 @@ copy_func (char **argv)
|
|
![](https://seccdn.libravatar.org/avatar/fcc0873d860f7e6944b3abea5b6b447609288dcd55d37b92d3e9e9b1a1e81f06?s=16&d=retro) |
28653a |
|
|
![](https://seccdn.libravatar.org/avatar/fcc0873d860f7e6944b3abea5b6b447609288dcd55d37b92d3e9e9b1a1e81f06?s=16&d=retro) |
28653a |
}
|
|
![](https://seccdn.libravatar.org/avatar/fcc0873d860f7e6944b3abea5b6b447609288dcd55d37b92d3e9e9b1a1e81f06?s=16&d=retro) |
28653a |
|
|
![](https://seccdn.libravatar.org/avatar/fcc0873d860f7e6944b3abea5b6b447609288dcd55d37b92d3e9e9b1a1e81f06?s=16&d=retro) |
28653a |
+/* Emulate the 'exit' builtin. The exit value is optional. */
|
|
![](https://seccdn.libravatar.org/avatar/fcc0873d860f7e6944b3abea5b6b447609288dcd55d37b92d3e9e9b1a1e81f06?s=16&d=retro) |
28653a |
+static int
|
|
![](https://seccdn.libravatar.org/avatar/fcc0873d860f7e6944b3abea5b6b447609288dcd55d37b92d3e9e9b1a1e81f06?s=16&d=retro) |
28653a |
+exit_func (char **argv)
|
|
![](https://seccdn.libravatar.org/avatar/fcc0873d860f7e6944b3abea5b6b447609288dcd55d37b92d3e9e9b1a1e81f06?s=16&d=retro) |
28653a |
+{
|
|
![](https://seccdn.libravatar.org/avatar/fcc0873d860f7e6944b3abea5b6b447609288dcd55d37b92d3e9e9b1a1e81f06?s=16&d=retro) |
28653a |
+ int exit_val = 0;
|
|
![](https://seccdn.libravatar.org/avatar/fcc0873d860f7e6944b3abea5b6b447609288dcd55d37b92d3e9e9b1a1e81f06?s=16&d=retro) |
28653a |
+
|
|
![](https://seccdn.libravatar.org/avatar/fcc0873d860f7e6944b3abea5b6b447609288dcd55d37b92d3e9e9b1a1e81f06?s=16&d=retro) |
28653a |
+ if (argv[0] != 0)
|
|
![](https://seccdn.libravatar.org/avatar/fcc0873d860f7e6944b3abea5b6b447609288dcd55d37b92d3e9e9b1a1e81f06?s=16&d=retro) |
28653a |
+ exit_val = atoi (argv[0]) & 0xff;
|
|
![](https://seccdn.libravatar.org/avatar/fcc0873d860f7e6944b3abea5b6b447609288dcd55d37b92d3e9e9b1a1e81f06?s=16&d=retro) |
28653a |
+ exit (exit_val);
|
|
![](https://seccdn.libravatar.org/avatar/fcc0873d860f7e6944b3abea5b6b447609288dcd55d37b92d3e9e9b1a1e81f06?s=16&d=retro) |
28653a |
+ return 0;
|
|
![](https://seccdn.libravatar.org/avatar/fcc0873d860f7e6944b3abea5b6b447609288dcd55d37b92d3e9e9b1a1e81f06?s=16&d=retro) |
28653a |
+}
|
|
![](https://seccdn.libravatar.org/avatar/fcc0873d860f7e6944b3abea5b6b447609288dcd55d37b92d3e9e9b1a1e81f06?s=16&d=retro) |
28653a |
+
|
|
![](https://seccdn.libravatar.org/avatar/fcc0873d860f7e6944b3abea5b6b447609288dcd55d37b92d3e9e9b1a1e81f06?s=16&d=retro) |
28653a |
/* This is a list of all the built-in commands we understand. */
|
|
![](https://seccdn.libravatar.org/avatar/fcc0873d860f7e6944b3abea5b6b447609288dcd55d37b92d3e9e9b1a1e81f06?s=16&d=retro) |
28653a |
static struct {
|
|
![](https://seccdn.libravatar.org/avatar/fcc0873d860f7e6944b3abea5b6b447609288dcd55d37b92d3e9e9b1a1e81f06?s=16&d=retro) |
28653a |
const char *name;
|
|
![](https://seccdn.libravatar.org/avatar/fcc0873d860f7e6944b3abea5b6b447609288dcd55d37b92d3e9e9b1a1e81f06?s=16&d=retro) |
28653a |
@@ -143,6 +155,7 @@ static struct {
|
|
![](https://seccdn.libravatar.org/avatar/fcc0873d860f7e6944b3abea5b6b447609288dcd55d37b92d3e9e9b1a1e81f06?s=16&d=retro) |
28653a |
{ "true", true_func },
|
|
![](https://seccdn.libravatar.org/avatar/fcc0873d860f7e6944b3abea5b6b447609288dcd55d37b92d3e9e9b1a1e81f06?s=16&d=retro) |
28653a |
{ "echo", echo_func },
|
|
![](https://seccdn.libravatar.org/avatar/fcc0873d860f7e6944b3abea5b6b447609288dcd55d37b92d3e9e9b1a1e81f06?s=16&d=retro) |
28653a |
{ "cp", copy_func },
|
|
![](https://seccdn.libravatar.org/avatar/fcc0873d860f7e6944b3abea5b6b447609288dcd55d37b92d3e9e9b1a1e81f06?s=16&d=retro) |
28653a |
+ { "exit", exit_func },
|
|
![](https://seccdn.libravatar.org/avatar/fcc0873d860f7e6944b3abea5b6b447609288dcd55d37b92d3e9e9b1a1e81f06?s=16&d=retro) |
28653a |
{ NULL, NULL }
|
|
![](https://seccdn.libravatar.org/avatar/fcc0873d860f7e6944b3abea5b6b447609288dcd55d37b92d3e9e9b1a1e81f06?s=16&d=retro) |
28653a |
};
|
|
![](https://seccdn.libravatar.org/avatar/fcc0873d860f7e6944b3abea5b6b447609288dcd55d37b92d3e9e9b1a1e81f06?s=16&d=retro) |
28653a |
|