Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@codesourcery.com>2006-06-10 00:31:19 +0400
committerNathan Sidwell <nathan@codesourcery.com>2006-06-10 00:31:19 +0400
commit9205d8c99b0e9ad6710c114cf14ec83feff10f59 (patch)
tree50edd9057ec051949ec55d8e00a80f29b4136271
parentc4f65466b96fbfcbc51a26bc6013ee20c86f0b6d (diff)
* m68k/bdm-system.c (_system): Support system(NULL).
-rw-r--r--ChangeLog.csl5
-rw-r--r--libgloss/m68k/bdm-system.c4
2 files changed, 7 insertions, 2 deletions
diff --git a/ChangeLog.csl b/ChangeLog.csl
index 3768c4c2b..5321d9bc0 100644
--- a/ChangeLog.csl
+++ b/ChangeLog.csl
@@ -1,3 +1,8 @@
+2006-06-09 Nathan Sidwell <nathan@codesourcery.com>
+
+ libgloss/
+ * m68k/bdm-system.c (_system): Support system(NULL).
+
2006-06-09 Sandra Loosemore <sandra@codesourcery.com>
* newlib/libc/sys/arm/syscalls.c (_unlink, isatty, _system, _rename):
diff --git a/libgloss/m68k/bdm-system.c b/libgloss/m68k/bdm-system.c
index 433713072..75a82e2a7 100644
--- a/libgloss/m68k/bdm-system.c
+++ b/libgloss/m68k/bdm-system.c
@@ -36,11 +36,11 @@ int _system (const char *command)
gdb_parambuf_t parameters;
parameters[0] = (uint32_t) command;
- parameters[1] = (uint32_t) strlen (command) + 1;
+ parameters[1] = command ? (uint32_t) strlen (command) + 1 : 0;
BDM_TRAP (BDM_SYSTEM, (uint32_t)parameters);
errno = convert_from_gdb_errno (parameters[1]);
e = parameters[0];
- if (e >= 0)
+ if (e >= 0 && command)
{
/* We have to convert e, an exit status to the encoded status of
the command. To avoid hard coding the exit status, we simply