Mercurial > ecos
comparison packages/io/flash/current/src/flashiodev.c @ 2951:ecbc3608d513
* src/flashiodev.c (flashiodev_lookup): Fix wrong code execution if
CYGFUN_IO_FLASH_BLOCK_FROM_FIS is enabled and
CYGFUN_IO_FLASH_BLOCK_FROM_DEVOFFSET is disabled.
| author | jlarmour |
|---|---|
| date | Sat, 15 May 2010 16:43:56 +0000 |
| parents | ccce4b32433a |
| children |
comparison
equal
deleted
inserted
replaced
| 2950:dc8e6a281225 | 2951:ecbc3608d513 |
|---|---|
| 245 &size)) | 245 &size)) |
| 246 return -ENODEV; // If the previous call worked, then this failing would be very wrong. | 246 return -ENODEV; // If the previous call worked, then this failing would be very wrong. |
| 247 start = flash_base; | 247 start = flash_base; |
| 248 end = flash_base + size - 1; | 248 end = flash_base + size - 1; |
| 249 valid = true; | 249 valid = true; |
| 250 } else | 250 } |
| 251 # ifdef CYGFUN_IO_FLASH_BLOCK_FROM_DEVOFFSET | |
| 252 else | |
| 253 # endif | |
| 251 #endif // ifdef CYGFUN_IO_FLASH_BLOCK_FROM_FIS | 254 #endif // ifdef CYGFUN_IO_FLASH_BLOCK_FROM_FIS |
| 252 #ifdef CYGFUN_IO_FLASH_BLOCK_FROM_DEVOFFSET | 255 #ifdef CYGFUN_IO_FLASH_BLOCK_FROM_DEVOFFSET |
| 253 // Next, support device numbers with offsets encoded in path name | 256 // Next, support device numbers with offsets encoded in path name |
| 254 // Note that for now we assume < 10 flash devices. I think this is reasonable | 257 // Note that for now we assume < 10 flash devices. I think this is reasonable |
| 255 // to avoid unnecessary code. It can be changed later if needed. | 258 // to avoid unnecessary code. It can be changed later if needed. |
