diff options
author | Leo C | 2018-08-31 23:36:06 +0200 |
---|---|---|
committer | Leo C | 2018-08-31 23:36:06 +0200 |
commit | 414caa77d5709bf3372d1f9245312781eee7961b (patch) | |
tree | f2a6db4c2723cafed364bf73cf48f28c6666f86b /include | |
parent | 85d34e1026065c340e2237e1d2ab56e868be86ec (diff) | |
download | z180-stamp-414caa77d5709bf3372d1f9245312781eee7961b.zip |
error handling: improved cmd_error() - print fatfs error strings
Diffstat (limited to 'include')
-rw-r--r-- | include/cmd_fat.h | 2 | ||||
-rw-r--r-- | include/command.h | 2 | ||||
-rw-r--r-- | include/strerror.h | 12 |
3 files changed, 15 insertions, 1 deletions
diff --git a/include/cmd_fat.h b/include/cmd_fat.h index ed96a52..222b14c 100644 --- a/include/cmd_fat.h +++ b/include/cmd_fat.h @@ -8,9 +8,11 @@ #define CMD_FAT_H #include "command.h" +#include "ff.h" extern cmd_tbl_t cmd_tbl_fat[]; +const FLASH char * fat_rctostr(FRESULT rc); command_ret_t do_fat(cmd_tbl_t *, uint_fast8_t, int, char * const []); void setup_fatfs(void); diff --git a/include/command.h b/include/command.h index d5eeb36..6109f9f 100644 --- a/include/command.h +++ b/include/command.h @@ -102,7 +102,7 @@ int cmd_process_error(cmd_tbl_t *cmdtp, int err); * * @fmt: */ -void cmd_error(const char *fmt, ...); +void cmd_error(int status, int errnum, const char *fmt, ...); /* * Monitor Command diff --git a/include/strerror.h b/include/strerror.h new file mode 100644 index 0000000..9cc0821 --- /dev/null +++ b/include/strerror.h @@ -0,0 +1,12 @@ +/* + * (C) Copyright 2014 Leo C. <erbl259-lmu@yahoo.de> + * + * SPDX-License-Identifier: GPL-2.0 + */ + +#ifndef STRERROR_H +#define STRERROR_H + +const FLASH char * my_strerror_P(int errnum); + +#endif /* STRERROR_H */ |