summaryrefslogtreecommitdiff
path: root/debian/patches/bootshell0009-fixup-more-error-handling.patch
diff options
context:
space:
mode:
authorJustus Winter <4winter@informatik.uni-hamburg.de>2015-11-27 19:08:13 +0100
committerJustus Winter <4winter@informatik.uni-hamburg.de>2015-11-27 19:08:13 +0100
commit5ef2ca66bc3a305bd6fc96ca14579415a4b50b25 (patch)
tree6fe5cfdc8afd51591f8b10c5f34014c8b2e0beec /debian/patches/bootshell0009-fixup-more-error-handling.patch
parent382e0c5ab257dde5880e50ff8af7dd839d7bc5c6 (diff)
drop old patch series
Diffstat (limited to 'debian/patches/bootshell0009-fixup-more-error-handling.patch')
-rw-r--r--debian/patches/bootshell0009-fixup-more-error-handling.patch70
1 files changed, 0 insertions, 70 deletions
diff --git a/debian/patches/bootshell0009-fixup-more-error-handling.patch b/debian/patches/bootshell0009-fixup-more-error-handling.patch
deleted file mode 100644
index 72d9a3a1..00000000
--- a/debian/patches/bootshell0009-fixup-more-error-handling.patch
+++ /dev/null
@@ -1,70 +0,0 @@
-From e88a341c9d13e5eac93b57890a980ded742aa8d4 Mon Sep 17 00:00:00 2001
-From: Justus Winter <4winter@informatik.uni-hamburg.de>
-Date: Mon, 9 Mar 2015 20:51:21 +0100
-Subject: [PATCH hurd 09/10] fixup more error handling
-
----
- bootshell/elf-exec.c | 23 +++++++++++++++++------
- 1 file changed, 17 insertions(+), 6 deletions(-)
-
-diff --git a/bootshell/elf-exec.c b/bootshell/elf-exec.c
-index c8a8e14..a61addb 100644
---- a/bootshell/elf-exec.c
-+++ b/bootshell/elf-exec.c
-@@ -117,7 +117,10 @@ boot_script_exec_cmd (mach_port_t task, char *path, int argc,
- arg_len += 5 * sizeof (int);
- stack_end = VM_MAX_ADDRESS;
- stack_start = VM_MAX_ADDRESS - 16 * 1024 * 1024;
-- vm_allocate (task, &stack_start, stack_end - stack_start, FALSE);
-+ err = vm_allocate (task, &stack_start, stack_end - stack_start, FALSE);
-+ if (err)
-+ return err;
-+
- arg_pos = (void *) ((stack_end - arg_len) & ~(sizeof (natural_t) - 1));
- args = mmap (0, stack_end - trunc_page ((vm_offset_t) arg_pos),
- PROT_READ|PROT_WRITE, MAP_ANON, 0, 0);
-@@ -137,12 +140,16 @@ boot_script_exec_cmd (mach_port_t task, char *path, int argc,
- p = (void *) p + sizeof (char *);
- memcpy (p, strings, stringlen);
- memset (args, 0, (vm_offset_t)arg_pos & (vm_page_size - 1));
-- vm_write (task, trunc_page ((vm_offset_t) arg_pos), (vm_address_t) args,
-- stack_end - trunc_page ((vm_offset_t) arg_pos));
-+ err = vm_write (task, trunc_page ((vm_offset_t) arg_pos), (vm_address_t) args,
-+ stack_end - trunc_page ((vm_offset_t) arg_pos));
-+ if (err)
-+ return err;
- munmap ((caddr_t) args,
- stack_end - trunc_page ((vm_offset_t) arg_pos));
-
-- thread_create (task, &thread);
-+ err = thread_create (task, &thread);
-+ if (err)
-+ return err;
-
- #ifdef i386_THREAD_STATE_COUNT
- {
-@@ -152,8 +159,10 @@ boot_script_exec_cmd (mach_port_t task, char *path, int argc,
- (thread_state_t) &regs, &reg_size);
- regs.eip = (int) startpc;
- regs.uesp = (int) arg_pos;
-- thread_set_state (thread, i386_THREAD_STATE,
-- (thread_state_t) &regs, reg_size);
-+ err = thread_set_state (thread, i386_THREAD_STATE,
-+ (thread_state_t) &regs, reg_size);
-+ if (err)
-+ return err;
- }
- #else
- # error needs to be ported
-@@ -177,6 +186,8 @@ elf_exec (mach_port_t task, char *argz, size_t argz_len)
-
- argc = argz_count (argz, argz_len);
- argv = malloc ((argc + 1) * sizeof *argv);
-+ if (argv == NULL)
-+ return ENOMEM;
- argz_extract (argz, argz_len, argv);
-
- err = boot_script_exec_cmd (task, argz, argc, argv, argz, argz_len);
---
-2.1.4
-