summaryrefslogtreecommitdiffstats
path: root/commands
diff options
context:
space:
mode:
authorKrzysztof Halasa <khc@pm.waw.pl>2010-12-21 00:02:02 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2010-12-21 09:02:40 +0100
commitd66ae58cd87c78b76652ecf750371b1e005d44de (patch)
tree90e82954c07e8e412f7c72d402c64b5de2f182f4 /commands
parentb754bc4cf0f2687411e9dde3a2115a9c5b8da79a (diff)
downloadbarebox-d66ae58cd87c78b76652ecf750371b1e005d44de.tar.gz
barebox-d66ae58cd87c78b76652ecf750371b1e005d44de.tar.xz
Cosmetic fixes, including format attributes for printf() and friends.
Signed-off-by: Krzysztof HaƂasa <khc@pm.waw.pl> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'commands')
-rw-r--r--commands/crc.c2
-rw-r--r--commands/flash.c4
-rw-r--r--commands/go.c2
-rw-r--r--commands/loadb.c1
-rw-r--r--commands/ls.c4
-rw-r--r--commands/menu.c2
6 files changed, 7 insertions, 8 deletions
diff --git a/commands/crc.c b/commands/crc.c
index 0873a1c07e..993074c746 100644
--- a/commands/crc.c
+++ b/commands/crc.c
@@ -134,7 +134,7 @@ static int do_crc(struct command *cmdtp, int argc, char *argv[])
#endif
if (verify && crc != vcrc) {
- printf(" != 0x%08x ** ERROR **", vcrc);
+ printf(" != 0x%08lx ** ERROR **", vcrc);
err = 1;
}
diff --git a/commands/flash.c b/commands/flash.c
index 9a0eb50371..a3f3508f2f 100644
--- a/commands/flash.c
+++ b/commands/flash.c
@@ -63,7 +63,7 @@ static int do_flerase(struct command *cmdtp, int argc, char *argv[])
fd = open(filename, O_WRONLY);
if (fd < 0) {
- printf("open %s:", filename, errno_str());
+ printf("open %s: %s", filename, errno_str());
return 1;
}
@@ -139,7 +139,7 @@ static int do_protect(struct command *cmdtp, int argc, char *argv[])
fd = open(filename, O_WRONLY);
if (fd < 0) {
- printf("open %s:", filename, errno_str());
+ printf("open %s: %s", filename, errno_str());
return 1;
}
diff --git a/commands/go.c b/commands/go.c
index 02629402ad..6082fe54e3 100644
--- a/commands/go.c
+++ b/commands/go.c
@@ -55,7 +55,7 @@ static int do_go(struct command *cmdtp, int argc, char *argv[])
} else
addr = (void *)simple_strtoul(argv[1], NULL, 16);
- printf("## Starting application at 0x%08lX ...\n", addr);
+ printf("## Starting application at 0x%p ...\n", addr);
console_flush();
diff --git a/commands/loadb.c b/commands/loadb.c
index dc0e517b57..439a83a45c 100644
--- a/commands/loadb.c
+++ b/commands/loadb.c
@@ -625,7 +625,6 @@ static ulong load_serial_ymodem(void)
int res, wr;
connection_info_t info;
char ymodemBuf[1024];
- ulong store_addr = ~0;
ulong addr = 0;
size = 0;
diff --git a/commands/ls.c b/commands/ls.c
index 4f9c408b1d..278a8bcad2 100644
--- a/commands/ls.c
+++ b/commands/ls.c
@@ -32,10 +32,10 @@
static void ls_one(const char *path, struct stat *s)
{
char modestr[11];
- unsigned long namelen = strlen(path);
+ unsigned int namelen = strlen(path);
mkmodestr(s->st_mode, modestr);
- printf("%s %10u %*.*s\n", modestr, s->st_size, namelen, namelen, path);
+ printf("%s %10lu %*.*s\n", modestr, s->st_size, namelen, namelen, path);
}
int ls(const char *path, ulong flags)
diff --git a/commands/menu.c b/commands/menu.c
index b9d66996a4..c3e090170a 100644
--- a/commands/menu.c
+++ b/commands/menu.c
@@ -119,7 +119,7 @@ static int do_menu_entry_remove(struct cmd_menu *cm)
me = menu_entry_get_by_num(m, cm->num);
if (!me) {
- eprintf("Entry '%s' not found\n", cm->num);
+ eprintf("Entry '%i' not found\n", cm->num);
return -EINVAL;
}