diff options
Diffstat (limited to 'common/flash.c')
-rw-r--r-- | common/flash.c | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/common/flash.c b/common/flash.c index 10dda3768b..09b773b809 100644 --- a/common/flash.c +++ b/common/flash.c @@ -301,38 +301,6 @@ int flash_set_protect(uint32_t mask, uint32_t flags) /*****************************************************************************/ /* Console commands */ -/** - * Parse offset and size from command line argv[shift] and argv[shift+1] - * - * Default values: If argc<=shift, leaves offset unchanged, returning error if - * *offset<0. If argc<shift+1, leaves size unchanged, returning error if - * *size<0. - */ -static int parse_offset_size(int argc, char **argv, int shift, - int *offset, int *size) -{ - char *e; - int i; - - if (argc > shift) { - i = (uint32_t)strtoi(argv[shift], &e, 0); - if (*e) - return EC_ERROR_PARAM1; - *offset = i; - } else if (*offset < 0) - return EC_ERROR_PARAM_COUNT; - - if (argc > shift + 1) { - i = (uint32_t)strtoi(argv[shift + 1], &e, 0); - if (*e) - return EC_ERROR_PARAM2; - *size = i; - } else if (*size < 0) - return EC_ERROR_PARAM_COUNT; - - return EC_SUCCESS; -} - static int command_flash_info(int argc, char **argv) { int i; |