diff options
author | germeier <germeier> | 2002-09-19 21:25:07 +0000 |
---|---|---|
committer | germeier <germeier> | 2002-09-19 21:25:07 +0000 |
commit | cf208d020339d2c0e755d6de1a5b312328908a4e (patch) | |
tree | 8776f73ed08a3766e4ff4c37f2a2792a6c8c1c5a | |
parent | 7d92b803c4808c6e5c7e43f064e532eaf0ec0fbd (diff) | |
download | mpiosh-cf208d020339d2c0e755d6de1a5b312328908a4e.tar.gz mpiosh-cf208d020339d2c0e755d6de1a5b312328908a4e.tar.bz2 mpiosh-cf208d020339d2c0e755d6de1a5b312328908a4e.zip |
fixed handling of an abort
fixed buggy define
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | libmpio/mpio.c | 4 | ||||
-rw-r--r-- | mpiosh/callback.c | 10 |
3 files changed, 14 insertions, 7 deletions
@@ -1,3 +1,9 @@ +2002-09-19 Markus Germeier <mager@tzi.de> + + * mpiosh/callback.c (mpiosh_cmd_dump, mpiosh_cmd_mget) + (mpiosh_cmd_mdel, mpiosh_cmd_mput): fixed handling of an abort + * libmpio/mpio.c (MPIO_ERR_RETURN): fixed buggy define + 2002-09-19 Andreas Buesching <crunchy@tzi.de> * mpiosh/mpiosh.c (mpiosh_command_regex_fix): hopefully fixed a @@ -11,6 +17,7 @@ (mpio_file_get, mpio_file_put, mpio_file_del): using error handling functions +>>>>>>> 1.40 2002-09-19 Markus Germeier <mager@tzi.de> * libmpio/mpio.c (mpio_init_internal): diff --git a/libmpio/mpio.c b/libmpio/mpio.c index ea0f23c..f1637cc 100644 --- a/libmpio/mpio.c +++ b/libmpio/mpio.c @@ -1,6 +1,6 @@ /* * - * $Id: mpio.c,v 1.21 2002/09/19 20:46:02 crunchy Exp $ + * $Id: mpio.c,v 1.22 2002/09/19 21:25:07 germeier Exp $ * * Library for USB MPIO-* * @@ -73,7 +73,7 @@ static const int mpio_error_num = sizeof mpio_errors / sizeof(mpio_error_t); static int _mpio_errno = 0; -#define MPIO_ERR_RETURN(err) _mpio_errno = err; return -1 +#define MPIO_ERR_RETURN(err) { _mpio_errno = err; return -1 ; } void mpio_init_internal(mpio_t *); void mpio_init_external(mpio_t *); diff --git a/mpiosh/callback.c b/mpiosh/callback.c index 814059a..ec929dc 100644 --- a/mpiosh/callback.c +++ b/mpiosh/callback.c @@ -2,7 +2,7 @@ * * Author: Andreas Büsching <crunchy@tzi.de> * - * $Id: callback.c,v 1.13 2002/09/19 21:19:02 crunchy Exp $ + * $Id: callback.c,v 1.14 2002/09/19 21:25:07 germeier Exp $ * * Copyright (C) 2001 Andreas Büsching <crunchy@tzi.de> * @@ -280,7 +280,7 @@ mpiosh_cmd_mget(char *args[]) debugn (2, "error in regular expression: %s (%s)\n", args[i], errortext); } else { p = mpio_directory_open(mpiosh.dev, mpiosh.card); - while (p != NULL) { + while ((p != NULL) ) { memset(fname, '\0', 100); mpio_dentry_get(mpiosh.dev, mpiosh.card, p, fname, 100, &year, &month, &day, &hour, &minute, &fsize); @@ -358,7 +358,7 @@ mpiosh_cmd_mput(char *args[]) } else { if ((size = scandir(dir_buf, &dentry, NULL, alphasort)) != -1) { run = dentry; - for (j = 0; j < size; j++, run++) { + for (j = 0; ((j < size) && (!mpiosh_cancel)); j++, run++) { if (!(error = regexec(®ex, (*run)->d_name, 0, NULL, 0))) { printf("putting '%s' ... \n", (*run)->d_name); if (mpio_file_put(mpiosh.dev, mpiosh.card, @@ -438,7 +438,7 @@ mpiosh_cmd_mdel(char *args[]) debugn (2, "error in regular expression: %s (%s)\n", args[i], errortext); } else { p = mpio_directory_open(mpiosh.dev, mpiosh.card); - while (p != NULL) { + while ((p != NULL) && (!mpiosh_cancel)) { memset(fname, '\0', 100); mpio_dentry_get(mpiosh.dev, mpiosh.card, p, fname, 100, &year, &month, &day, &hour, &minute, &fsize); @@ -487,7 +487,7 @@ mpiosh_cmd_dump(char *args[]) arg[1] = NULL; p = mpio_directory_open(mpiosh.dev, mpiosh.card); - while (p != NULL) { + while ((p != NULL) && (!mpiosh_cancel)) { memset(fname, '\0', 256); mpio_dentry_get(mpiosh.dev, mpiosh.card, p, |