diff options
author | germeier <germeier> | 2003-09-23 21:32:34 +0000 |
---|---|---|
committer | germeier <germeier> | 2003-09-23 21:32:34 +0000 |
commit | 7411077cbbbf0baf190ccf90aa5983b0342857ba (patch) | |
tree | ca4e5d85ccf1dc6135acf4a78667244a251b8583 | |
parent | c5e32205602d8f34acca9dacee6a8e5a7bffe239 (diff) | |
download | mpiosh-7411077cbbbf0baf190ccf90aa5983b0342857ba.tar.gz mpiosh-7411077cbbbf0baf190ccf90aa5983b0342857ba.tar.bz2 mpiosh-7411077cbbbf0baf190ccf90aa5983b0342857ba.zip |
minor fix to support SM cards 16MB and below
-rw-r--r-- | ChangeLog | 2 | ||||
-rw-r--r-- | libmpio/src/mpio.c | 4 |
2 files changed, 4 insertions, 2 deletions
@@ -2,6 +2,8 @@ * libmpio/src/io.c (model2externalmem): added FY100 and VP-01 to the list, the external memory of these is now supported. (Thanks to John for providing the information!) + * libmpio/src/mpio.c (mpio_init_external): + minor change to possibly support card 16MB and below 2003-09-22 Markus Germeier <mager@tzi.de> * added Johns patch to support the VirginPulse diff --git a/libmpio/src/mpio.c b/libmpio/src/mpio.c index ce96087..9eed19a 100644 --- a/libmpio/src/mpio.c +++ b/libmpio/src/mpio.c @@ -1,5 +1,5 @@ /* - * $Id: mpio.c,v 1.8 2003/09/22 19:15:37 germeier Exp $ + * $Id: mpio.c,v 1.9 2003/09/23 21:32:34 germeier Exp $ * * libmpio - a library for accessing Digit@lways MPIO players * Copyright (C) 2002, 2003 Markus Germeier @@ -267,7 +267,7 @@ mpio_init_external(mpio_t *m) } /* for reading the spare area later! */ - sm->max_blocks = sm->size / 16 * 1024; /* 1 cluster == 16 KB */ + sm->max_blocks = (sm->size * 1024) / 16 ; /* 1 cluster == 16 KB */ sm->spare = malloc(sm->max_blocks * 0x10); } |