diff options
author | Justus Winter <4winter@informatik.uni-hamburg.de> | 2015-07-12 14:46:54 +0200 |
---|---|---|
committer | Justus Winter <4winter@informatik.uni-hamburg.de> | 2015-07-12 14:46:54 +0200 |
commit | d58460f26f71d7b97cc612dbe2420f65e99ac1b7 (patch) | |
tree | 6d0de9b65992b098887f0769abb3e9524d855e03 | |
parent | 57a0ff18d82f962b3f0d9adefaf1c3aa3baa111e (diff) |
add patch series
-rw-r--r-- | debian/patches/fix-remount0001-fix-set-name.patch | 91 | ||||
-rw-r--r-- | debian/patches/series | 1 |
2 files changed, 92 insertions, 0 deletions
diff --git a/debian/patches/fix-remount0001-fix-set-name.patch b/debian/patches/fix-remount0001-fix-set-name.patch new file mode 100644 index 00000000..c4cd0d98 --- /dev/null +++ b/debian/patches/fix-remount0001-fix-set-name.patch @@ -0,0 +1,91 @@ +From ee6d233d247808b254649478a975c92a4b29b9ab Mon Sep 17 00:00:00 2001 +From: Justus Winter <4winter@informatik.uni-hamburg.de> +Date: Sun, 12 Jul 2015 14:46:50 +0200 +Subject: [PATCH hurd] fix set name + +--- + exec/exec.c | 47 ++++++++++++++++++++++++++++++----------------- + startup/startup.c | 1 - + 2 files changed, 30 insertions(+), 18 deletions(-) + +diff --git a/exec/exec.c b/exec/exec.c +index ee500d7..59270dd 100644 +--- a/exec/exec.c ++++ b/exec/exec.c +@@ -686,6 +686,33 @@ finish (struct execdata *e, int dealloc_file) + } + } + ++static void ++set_name (task_t task, const char *exec_name, pid_t pid) ++{ ++ char *name; ++ int size; ++ ++ if (pid) ++ size = asprintf (&name, "%s(%d)", exec_name, pid); ++ else ++ size = asprintf (&name, "%s", exec_name); ++ ++ if (size > 0) ++ { ++ /* This is an internal implementational detail of the gnumach kernel. */ ++#define TASK_NAME_SIZE 32 ++ if (size < TASK_NAME_SIZE) ++ task_set_name (task, name); ++ else ++ { ++ char *abbr = name + size - TASK_NAME_SIZE + 1; ++ abbr[0] = abbr[1] = abbr[2] = '.'; ++ task_set_name (task, abbr); ++ } ++#undef TASK_NAME_SIZE ++ free (name); ++ } ++} + + /* Load the file. */ + static void +@@ -1173,24 +1200,10 @@ do_exec (file_t file, + if (e.error) + goto out; + +- char *name; +- int size = asprintf (&name, "%s(%d)", argv, pid); +- if (size > 0) +- { +-/* This is an internal implementational detail of the gnumach kernel. */ +-#define TASK_NAME_SIZE 32 +- if (size < TASK_NAME_SIZE) +- task_set_name (newtask, name); +- else +- { +- char *abbr = name + size - TASK_NAME_SIZE + 1; +- abbr[0] = abbr[1] = abbr[2] = '.'; +- task_set_name (newtask, abbr); +- } +-#undef TASK_NAME_SIZE +- free (name); +- } ++ set_name (newtask, argv, pid); + } ++ else ++ set_name (newtask, argv, 0); + + /* Create the initial thread. */ + e.error = thread_create (newtask, &thread); +diff --git a/startup/startup.c b/startup/startup.c +index da78b13..e916768 100644 +--- a/startup/startup.c ++++ b/startup/startup.c +@@ -377,7 +377,6 @@ run (const char *server, mach_port_t *ports, task_t *task) + printf ("Pausing for %s\n", prog); + getchar (); + } +- task_set_name (*task, (char *) prog); + err = file_exec (file, *task, 0, + (char *)prog, strlen (prog) + 1, /* Args. */ + startup_envz, startup_envz_len, +-- +2.1.4 + diff --git a/debian/patches/series b/debian/patches/series index 47d3aea4..04abc607 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -68,3 +68,4 @@ introspection0005-libdiskfs-annotate-objects-managed-by-libports.patch introspection0006-libpager-annotate-objects-managed-by-libports.patch introspection0007-ext2fs-annotate-objects-managed-by-libports.patch introspection0008-utils-rpctrace-support-attaching-to-servers.patch +fix-remount0001-fix-set-name.patch |