apps/nshlib/nsh_ddcmd.c: Cosmetic edition of FAR

This commit is contained in:
Gregory Nutt 2019-06-03 09:19:09 -06:00
parent 63de16bd58
commit 6c815a8d48

View File

@ -106,9 +106,9 @@ static const char g_dd[] = "dd";
* Name: dd_write * Name: dd_write
****************************************************************************/ ****************************************************************************/
static int dd_write(struct dd_s *dd) static int dd_write(FAR struct dd_s *dd)
{ {
uint8_t *buffer = dd->buffer; FAR uint8_t *buffer = dd->buffer;
uint16_t written ; uint16_t written ;
ssize_t nbytes; ssize_t nbytes;
@ -137,9 +137,9 @@ static int dd_write(struct dd_s *dd)
* Name: dd_read * Name: dd_read
****************************************************************************/ ****************************************************************************/
static int dd_read(struct dd_s *dd) static int dd_read(FAR struct dd_s *dd)
{ {
uint8_t *buffer = dd->buffer; FAR uint8_t *buffer = dd->buffer;
ssize_t nbytes; ssize_t nbytes;
dd->nbytes = 0; dd->nbytes = 0;
@ -166,7 +166,7 @@ static int dd_read(struct dd_s *dd)
* Name: dd_infopen * Name: dd_infopen
****************************************************************************/ ****************************************************************************/
static inline int dd_infopen(const char *name, struct dd_s *dd) static inline int dd_infopen(FAR const char *name, FAR struct dd_s *dd)
{ {
dd->infd = open(name, O_RDONLY); dd->infd = open(name, O_RDONLY);
if (dd->infd < 0) if (dd->infd < 0)
@ -183,7 +183,7 @@ static inline int dd_infopen(const char *name, struct dd_s *dd)
* Name: dd_outfopen * Name: dd_outfopen
****************************************************************************/ ****************************************************************************/
static inline int dd_outfopen(const char *name, struct dd_s *dd) static inline int dd_outfopen(FAR const char *name, FAR struct dd_s *dd)
{ {
dd->outfd = open(name, O_WRONLY | O_CREAT | O_TRUNC, 0644); dd->outfd = open(name, O_WRONLY | O_CREAT | O_TRUNC, 0644);
if (dd->outfd < 0) if (dd->outfd < 0)
@ -206,8 +206,8 @@ static inline int dd_outfopen(const char *name, struct dd_s *dd)
int cmd_dd(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv) int cmd_dd(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
{ {
struct dd_s dd; struct dd_s dd;
char *infile = NULL; FAR char *infile = NULL;
char *outfile = NULL; FAR char *outfile = NULL;
#ifdef CONFIG_NSH_CMDOPT_DD_STATS #ifdef CONFIG_NSH_CMDOPT_DD_STATS
struct timespec ts0; struct timespec ts0;
struct timespec ts1; struct timespec ts1;
@ -405,3 +405,4 @@ errout_with_paths:
} }
#endif /* !CONFIG_NSH_DISABLE_DD */ #endif /* !CONFIG_NSH_DISABLE_DD */