diff options
| author | germeier <germeier> | 2002-09-23 22:38:03 +0000 | 
|---|---|---|
| committer | germeier <germeier> | 2002-09-23 22:38:03 +0000 | 
| commit | 394e96c30d87613fc733167297d1bf594d5e5035 (patch) | |
| tree | a6317a05308aec1db82c479dc82c82fd25ede337 /mpiosh | |
| parent | 6557eca4248c1e46249342c1368b13e1618448c8 (diff) | |
| download | mpiosh-394e96c30d87613fc733167297d1bf594d5e5035.tar.gz mpiosh-394e96c30d87613fc733167297d1bf594d5e5035.tar.bz2 mpiosh-394e96c30d87613fc733167297d1bf594d5e5035.zip | |
read spare area from external memory too
display progress for internal and external memory
a few code clean ups and checks
renamed debug_memory to dump_memory and dump more memory areas now
a lot of little changes and updates
Diffstat (limited to 'mpiosh')
| -rw-r--r-- | mpiosh/callback.c | 23 | ||||
| -rw-r--r-- | mpiosh/callback.h | 6 | ||||
| -rw-r--r-- | mpiosh/mpiosh.c | 8 | 
3 files changed, 24 insertions, 13 deletions
| diff --git a/mpiosh/callback.c b/mpiosh/callback.c index 6f9463c..8fd1e5f 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.17 2002/09/21 22:17:15 germeier Exp $ + * $Id: callback.c,v 1.18 2002/09/23 22:38:03 germeier Exp $   *   * Copyright (C) 2001 Andreas Büsching <crunchy@tzi.de>   * @@ -31,7 +31,6 @@  #include <unistd.h>  #include "mpiosh.h" -  #include "libmpio/debug.h"  /* commands */ @@ -230,9 +229,21 @@ mpiosh_cmd_quit(char *args[])  }  BYTE -mpiosh_callback_init(int read, int total)  +mpiosh_callback_init(mpio_mem_t mem, int read, int total)   { -  printf("\rinitialized %.2f %%", ((double) read / total) * 100.0 ); +  switch(mem)  +    { +    case MPIO_INTERNAL_MEM: +      printf("\rinternal memory: " ); +      break; +    case MPIO_EXTERNAL_MEM: +      printf("\rexternal memory: " ); +      break; +    default: +      printf("\runknown  memory: " ); +    } +   +  printf("initialized %.2f %% ", ((double) read / total) * 100.0 );    fflush(stdout);    return mpiosh_cancel; // continue @@ -597,14 +608,14 @@ mpiosh_cmd_switch(char *args[])  }  void -mpiosh_cmd_debug_mem(char *args[]) +mpiosh_cmd_dump_mem(char *args[])  {    MPIOSH_CHECK_CONNECTION_CLOSED;    UNUSED(args); -  mpio_memory_debug(mpiosh.dev, mpiosh.card); +  mpio_memory_dump(mpiosh.dev, mpiosh.card);  } diff --git a/mpiosh/callback.h b/mpiosh/callback.h index 08a756c..05019bf 100644 --- a/mpiosh/callback.h +++ b/mpiosh/callback.h @@ -2,7 +2,7 @@   *   * Author: Andreas Büsching  <crunchy@tzi.de>   * - * $Id: callback.h,v 1.4 2002/09/18 22:18:29 germeier Exp $ + * $Id: callback.h,v 1.5 2002/09/23 22:38:03 germeier Exp $   *   * Copyright (C) 2001 Andreas Büsching <crunchy@tzi.de>   * @@ -46,7 +46,7 @@ void mpiosh_cmd_dump(char *args[]);  void mpiosh_cmd_free(char *args[]);  void mpiosh_cmd_format(char *args[]);  void mpiosh_cmd_switch(char *args[]); -void mpiosh_cmd_debug_mem(char *args[]); +void mpiosh_cmd_dump_mem(char *args[]);  /* local command callbacks */  void mpiosh_cmd_ldir(char *args[]); @@ -55,7 +55,7 @@ void mpiosh_cmd_lcd(char *args[]);  void mpiosh_cmd_lmkdir(char *args[]);  /* progress callbacks */ -BYTE mpiosh_callback_init(int read, int total); +BYTE mpiosh_callback_init(mpio_mem_t, int read, int total);  BYTE mpiosh_callback_get(int read, int total);  BYTE mpiosh_callback_put(int read, int total);  BYTE mpiosh_callback_del(int read, int total); diff --git a/mpiosh/mpiosh.c b/mpiosh/mpiosh.c index f40fd9d..508bf3d 100644 --- a/mpiosh/mpiosh.c +++ b/mpiosh/mpiosh.c @@ -2,7 +2,7 @@  /*    * - * $Id: mpiosh.c,v 1.17 2002/09/21 22:17:15 germeier Exp $ + * $Id: mpiosh.c,v 1.18 2002/09/23 22:38:03 germeier Exp $   *   * Author: Andreas Büsching  <crunchy@tzi.de>   * @@ -125,9 +125,9 @@ mpiosh_cmd_t commands[] = {    { "lmkdir", NULL,      "create a local directory",      mpiosh_cmd_lmkdir }, -  { "debug_memory", NULL, -    "dump the first 0x100 of the selected memory card", -    mpiosh_cmd_debug_mem }, +  { "dump_memory", NULL, +    "dump FAT, directory, spare area and the first 0x100 of the selected memory card", +    mpiosh_cmd_dump_mem },    { NULL, NULL, NULL, NULL }  }; | 
