aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Bock <nicolasbock@gmail.com>2013-09-11 14:24:49 -0600
committerNicolas Bock <nicolasbock@gmail.com>2013-09-11 14:24:49 -0600
commit1adabc26ce1154bea0cffe6f09597fa8aae6eec6 (patch)
tree5c7cd30d5c9630b3afa1957b33ecdca810d8f779 /sys-cluster/charm/files
parentsys-cluster/charm-6.5.1-r1: Backported patch just added to correct upstream v... (diff)
downloadsci-1adabc26ce1154bea0cffe6f09597fa8aae6eec6.tar.gz
sci-1adabc26ce1154bea0cffe6f09597fa8aae6eec6.tar.bz2
sci-1adabc26ce1154bea0cffe6f09597fa8aae6eec6.zip
sys-cluster/charm-6.5.1: Fix patch for the last time.
Package-Manager: portage-2.2.2
Diffstat (limited to 'sys-cluster/charm/files')
-rw-r--r--sys-cluster/charm/files/charm-6.5.1-fix-string-parsing.patch16
1 files changed, 9 insertions, 7 deletions
diff --git a/sys-cluster/charm/files/charm-6.5.1-fix-string-parsing.patch b/sys-cluster/charm/files/charm-6.5.1-fix-string-parsing.patch
index 9655343c6..cfb81aafe 100644
--- a/sys-cluster/charm/files/charm-6.5.1-fix-string-parsing.patch
+++ b/sys-cluster/charm/files/charm-6.5.1-fix-string-parsing.patch
@@ -1,21 +1,21 @@
-From db515b327e423d0ca39a56df15c5e3225154daeb Mon Sep 17 00:00:00 2001
+From 7a8bf20508f54a223c13e62c7c485a7de4aaeba0 Mon Sep 17 00:00:00 2001
From: Nicolas Bock <nicolasbock@gmail.com>
Date: Wed, 11 Sep 2013 14:13:30 -0600
-Subject: [PATCH] charmrun.C: parsing of strings now parses "\n" into '\n'
+Subject: [PATCH] charmrun.c: parsing of strings now parses "\n" into '\n'
Since gdb lacks anything like ';' to separate several commands in one line,
the commands need to be separated by a newline character. I have added some
parsing logic so that the string "\n" will now be translated into the
character '\n'.
---
- src/arch/net/charmrun/charmrun.c | 22 ++++++++++++++++++++--
- 1 file changed, 20 insertions(+), 2 deletions(-)
+ src/arch/net/charmrun/charmrun.c | 24 ++++++++++++++++++++++--
+ 1 file changed, 22 insertions(+), 2 deletions(-)
diff --git a/src/arch/net/charmrun/charmrun.c b/src/arch/net/charmrun/charmrun.c
-index 6837712..54fc8bc 100644
+index 6837712..bf370c1 100644
--- a/src/arch/net/charmrun/charmrun.c
+++ b/src/arch/net/charmrun/charmrun.c
-@@ -454,8 +454,26 @@ static int pparam_setdef(def, value)
+@@ -454,8 +454,28 @@ static int pparam_setdef(def, value)
if (*p) return -1;
return 0;
case 's' :
@@ -25,7 +25,9 @@ index 6837712..54fc8bc 100644
+ /* Parse input string and convert a literal "\n" into '\n'. */
+ *def->where.s = (char*) calloc(strlen(value)+1, sizeof(char));
+ char* parsed_value = (char*) *def->where.s;
-+ for(int i = 0, j = 0; i < strlen(value); i++)
++ int i;
++ int j = 0;
++ for(i = 0; i < strlen(value); i++)
+ {
+ fprintf(stderr, "i = %d, j = %d, value[i] = \n", i, j);
+ if(i+1 < strlen(value))