aboutsummaryrefslogtreecommitdiff
path: root/mpiosh
diff options
context:
space:
mode:
authorcrunchy <crunchy>2002-09-18 20:32:21 +0000
committercrunchy <crunchy>2002-09-18 20:32:21 +0000
commit4a49120603daab9f9ad280f0ef44e36b0218a302 (patch)
treeb52ecd086c0ffdb03018c7f1cbdfba5634ab923e /mpiosh
parent4b5697d9e49aa865058acf71b9a464ff939e8b1e (diff)
downloadmpiosh-4a49120603daab9f9ad280f0ef44e36b0218a302.tar.gz
mpiosh-4a49120603daab9f9ad280f0ef44e36b0218a302.tar.bz2
mpiosh-4a49120603daab9f9ad280f0ef44e36b0218a302.zip
bug fix for mput; removed compiler warnings; better return values on error
Diffstat (limited to 'mpiosh')
-rw-r--r--mpiosh/callback.c7
-rw-r--r--mpiosh/mpiosh.c8
2 files changed, 10 insertions, 5 deletions
diff --git a/mpiosh/callback.c b/mpiosh/callback.c
index 74a4567..df4a3ab 100644
--- a/mpiosh/callback.c
+++ b/mpiosh/callback.c
@@ -2,7 +2,7 @@
*
* Author: Andreas Bsching <crunchy@tzi.de>
*
- * $Id: callback.c,v 1.8 2002/09/15 20:07:10 crunchy Exp $
+ * $Id: callback.c,v 1.9 2002/09/18 20:32:22 crunchy Exp $
*
* Copyright (C) 2001 Andreas Bsching <crunchy@tzi.de>
*
@@ -340,6 +340,11 @@ mpiosh_cmd_mput(char *args[])
printf("putting '%s' ... \n", (*run)->d_name);
fsize = mpio_file_put(mpiosh.dev, mpiosh.card,
(*run)->d_name, mpiosh_callback_put);
+ if ((fsize < 0) && (fsize == MPIO_ERR_NOT_ENOUGH_SPACE)) {
+ fprintf(stderr, "error: not enough space left on memory card\n");
+ break;
+ }
+
if (mpiosh_cancel) break;
printf("\n");
written=1; /* we did write something, so do mpio_sync afterwards */
diff --git a/mpiosh/mpiosh.c b/mpiosh/mpiosh.c
index 79285d3..10e518e 100644
--- a/mpiosh/mpiosh.c
+++ b/mpiosh/mpiosh.c
@@ -2,7 +2,7 @@
/*
*
- * $Id: mpiosh.c,v 1.12 2002/09/15 14:55:58 crunchy Exp $
+ * $Id: mpiosh.c,v 1.13 2002/09/18 20:32:22 crunchy Exp $
*
* Author: Andreas Bsching <crunchy@tzi.de>
*
@@ -256,13 +256,13 @@ mpiosh_command_regex_fix(char *argv[])
new_pos = buffer;
*new_pos++ = '^';
while (*help != '\0') {
- if (*help == '*') {
+ if (*help == '*' && ((help = *walk) || (*(help - 1) != '.'))) {
*new_pos++ = '.';
*new_pos = *help;
- } else if (*help == '.') {
+ } else if ((*help == '.') && (*help != '*')) {
*new_pos++ = '\\';
*new_pos = *help;
- } else if (*help == '?') {
+ } else if (*help == '?' && ((help = *walk) || (*(help - 1) != '\\'))) {
*new_pos = '.';
} else {
*new_pos = *help;