summaryrefslogtreecommitdiffstats
path: root/commands
diff options
context:
space:
mode:
authorSascha Hauer <sha@octopus.labnet.pengutronix.de>2007-09-28 10:07:26 +0200
committerSascha Hauer <sha@octopus.labnet.pengutronix.de>2007-09-28 10:07:26 +0200
commitb3dc734018ef4dff8bab10409cd3ddf5ee10c48c (patch)
tree5f63c72afb179be139d44d0d823253f08f0392fc /commands
parent27bf8f1deabda87d07a8b9c7e21b59484f1a197e (diff)
downloadbarebox-b3dc734018ef4dff8bab10409cd3ddf5ee10c48c.tar.gz
barebox-b3dc734018ef4dff8bab10409cd3ddf5ee10c48c.tar.xz
declare lots of functions static
Diffstat (limited to 'commands')
-rw-r--r--commands/bootm.c6
-rw-r--r--commands/clear.c2
-rw-r--r--commands/cp.c2
-rw-r--r--commands/crc.c2
-rw-r--r--commands/edit.c2
-rw-r--r--commands/environment.c4
-rw-r--r--commands/flash.c4
-rw-r--r--commands/go.c2
-rw-r--r--commands/mem.c6
-rw-r--r--commands/meminfo.c2
-rw-r--r--commands/memtest.c4
-rw-r--r--commands/net.c14
-rw-r--r--commands/partition.c4
-rw-r--r--commands/reginfo.c2
-rw-r--r--commands/sleep.c2
-rw-r--r--commands/splash.c2
-rw-r--r--commands/test.c3
17 files changed, 30 insertions, 33 deletions
diff --git a/commands/bootm.c b/commands/bootm.c
index 8f45d4c348..4a0d00daec 100644
--- a/commands/bootm.c
+++ b/commands/bootm.c
@@ -317,7 +317,7 @@ void unmap_image(struct image_handle *handle)
#define OPT_OFTREE
#endif
-int do_bootm (cmd_tbl_t *cmdtp, int argc, char *argv[])
+static int do_bootm (cmd_tbl_t *cmdtp, int argc, char *argv[])
{
ulong iflag;
int verify = 1;
@@ -666,7 +666,7 @@ do_bootm_artos (cmd_tbl_t *cmdtp,
#endif
#ifdef CONFIG_CMD_IMI
-int do_iminfo ( cmd_tbl_t *cmdtp, int argc, char *argv[])
+static int do_iminfo ( cmd_tbl_t *cmdtp, int argc, char *argv[])
{
int arg;
ulong addr;
@@ -776,7 +776,7 @@ print_image_hdr (image_header_t *hdr)
}
#ifdef CONFIG_BZLIB
-void bz_internal_error(int errcode)
+static void bz_internal_error(int errcode)
{
printf ("BZIP2 internal error %d\n", errcode);
}
diff --git a/commands/clear.c b/commands/clear.c
index 2ddd00d8aa..dac15c8658 100644
--- a/commands/clear.c
+++ b/commands/clear.c
@@ -24,7 +24,7 @@
#include <command.h>
#include <readkey.h>
-int do_clear (cmd_tbl_t *cmdtp, int argc, char *argv[])
+static int do_clear (cmd_tbl_t *cmdtp, int argc, char *argv[])
{
printf(ANSI_CLEAR_SCREEN);
diff --git a/commands/cp.c b/commands/cp.c
index 032593df54..449cc10299 100644
--- a/commands/cp.c
+++ b/commands/cp.c
@@ -30,7 +30,7 @@
#define RW_BUF_SIZE (ulong)4096
-int do_cp ( cmd_tbl_t *cmdtp, int argc, char *argv[])
+static int do_cp ( cmd_tbl_t *cmdtp, int argc, char *argv[])
{
int r, w, ret = 1;
int src = 0, dst = 0;
diff --git a/commands/crc.c b/commands/crc.c
index d36b5d363a..69633ce594 100644
--- a/commands/crc.c
+++ b/commands/crc.c
@@ -8,7 +8,7 @@
#include <malloc.h>
#include <linux/ctype.h>
-int do_crc (cmd_tbl_t *cmdtp, int argc, char *argv[])
+static int do_crc (cmd_tbl_t *cmdtp, int argc, char *argv[])
{
ulong start = 0, size = ~0, total = 0, now;
ulong crc = 0, vcrc = 0;
diff --git a/commands/edit.c b/commands/edit.c
index 5f04ff5ed0..9998d765c8 100644
--- a/commands/edit.c
+++ b/commands/edit.c
@@ -373,7 +373,7 @@ static void getwinsize(void) {
}
#endif
-int do_edit(cmd_tbl_t * cmdtp, int argc, char *argv[])
+static int do_edit(cmd_tbl_t * cmdtp, int argc, char *argv[])
{
int lastscrcol;
int i;
diff --git a/commands/environment.c b/commands/environment.c
index d08cd9f63b..007ef4edfe 100644
--- a/commands/environment.c
+++ b/commands/environment.c
@@ -142,7 +142,7 @@ out1:
}
#ifdef __U_BOOT__
-int do_saveenv(cmd_tbl_t *cmdtp, int argc, char *argv[])
+static int do_saveenv(cmd_tbl_t *cmdtp, int argc, char *argv[])
{
int ret, fd;
char *filename, *dirname;
@@ -317,7 +317,7 @@ out:
}
#ifdef __U_BOOT__
-int do_loadenv(cmd_tbl_t *cmdtp, int argc, char *argv[])
+static int do_loadenv(cmd_tbl_t *cmdtp, int argc, char *argv[])
{
char *filename, *dirname;
diff --git a/commands/flash.c b/commands/flash.c
index 110d92a5c0..82cce0fdca 100644
--- a/commands/flash.c
+++ b/commands/flash.c
@@ -33,7 +33,7 @@
#include <fcntl.h>
#include <linux/stat.h>
-int do_flerase (cmd_tbl_t *cmdtp, int argc, char *argv[])
+static int do_flerase (cmd_tbl_t *cmdtp, int argc, char *argv[])
{
int fd;
char *filename = NULL;
@@ -90,7 +90,7 @@ U_BOOT_CMD_START(erase)
U_BOOT_CMD_HELP(cmd_erase_help)
U_BOOT_CMD_END
-int do_protect (cmd_tbl_t *cmdtp, int argc, char *argv[])
+static int do_protect (cmd_tbl_t *cmdtp, int argc, char *argv[])
{
int fd;
char *filename = NULL;
diff --git a/commands/go.c b/commands/go.c
index 36eca21187..f6d8fcd135 100644
--- a/commands/go.c
+++ b/commands/go.c
@@ -28,7 +28,7 @@
#include <common.h>
#include <command.h>
-int do_go (cmd_tbl_t *cmdtp, int argc, char *argv[])
+static int do_go (cmd_tbl_t *cmdtp, int argc, char *argv[])
{
ulong addr, rc;
int rcode = 0;
diff --git a/commands/mem.c b/commands/mem.c
index ffe2c3b818..0dbad839df 100644
--- a/commands/mem.c
+++ b/commands/mem.c
@@ -210,7 +210,7 @@ U_BOOT_CMD_START(md)
U_BOOT_CMD_HELP(cmd_md_help)
U_BOOT_CMD_END
-int do_mem_mw ( cmd_tbl_t *cmdtp, int argc, char *argv[])
+static int do_mem_mw ( cmd_tbl_t *cmdtp, int argc, char *argv[])
{
int ret = 0;
int fd;
@@ -284,7 +284,7 @@ U_BOOT_CMD_START(mw)
U_BOOT_CMD_HELP(cmd_mw_help)
U_BOOT_CMD_END
-int do_mem_cmp (cmd_tbl_t *cmdtp, int argc, char *argv[])
+static int do_mem_cmp (cmd_tbl_t *cmdtp, int argc, char *argv[])
{
ulong addr1, addr2, count, ngood;
int size;
@@ -359,7 +359,7 @@ U_BOOT_CMD_START(memcmp)
U_BOOT_CMD_HELP(cmd_memcmp_help)
U_BOOT_CMD_END
-int do_mem_cp (cmd_tbl_t *cmdtp, int argc, char *argv[])
+static int do_mem_cp (cmd_tbl_t *cmdtp, int argc, char *argv[])
{
ulong count;
ulong dest, src;
diff --git a/commands/meminfo.c b/commands/meminfo.c
index 634d661740..95f27e0f4f 100644
--- a/commands/meminfo.c
+++ b/commands/meminfo.c
@@ -23,7 +23,7 @@
#include <command.h>
#include <malloc.h>
-int do_meminfo (cmd_tbl_t *cmdtp, int argc, char *argv[])
+static int do_meminfo (cmd_tbl_t *cmdtp, int argc, char *argv[])
{
malloc_stats();
diff --git a/commands/memtest.c b/commands/memtest.c
index fd1ffa5bad..88d8aa356a 100644
--- a/commands/memtest.c
+++ b/commands/memtest.c
@@ -259,7 +259,7 @@ static int mem_test(ulong _start, ulong _end, ulong pattern_unused)
}
#else
-int mem_test(ulong _start, ulong _end, ulong pattern)
+static int mem_test(ulong _start, ulong _end, ulong pattern)
{
vu_long *addr;
vu_long *start = (vu_long *)_start;
@@ -317,7 +317,7 @@ int mem_test(ulong _start, ulong _end, ulong pattern)
}
#endif
-int do_mem_mtest (cmd_tbl_t *cmdtp, int argc, char *argv[])
+static int do_mem_mtest (cmd_tbl_t *cmdtp, int argc, char *argv[])
{
ulong start, end, pattern = 0;
diff --git a/commands/net.c b/commands/net.c
index 106ae8f064..2f1bf1360e 100644
--- a/commands/net.c
+++ b/commands/net.c
@@ -33,8 +33,6 @@
#include <fcntl.h>
#include <errno.h>
-extern int do_bootm (cmd_tbl_t *, int, int, char *[]);
-
static int netboot_common (proto_t, cmd_tbl_t *, int , char *[]);
static void netboot_update_env (void)
@@ -88,7 +86,7 @@ static void netboot_update_env (void)
#endif
}
-int do_bootp (cmd_tbl_t *cmdtp, int argc, char *argv[])
+static int do_bootp (cmd_tbl_t *cmdtp, int argc, char *argv[])
{
return netboot_common (BOOTP, cmdtp, argc, argv);
}
@@ -100,7 +98,7 @@ U_BOOT_CMD_START(bootp)
U_BOOT_CMD_HELP("[loadAddress] [bootfilename]\n")
U_BOOT_CMD_END
-int do_tftpb (cmd_tbl_t *cmdtp, int argc, char *argv[])
+static int do_tftpb (cmd_tbl_t *cmdtp, int argc, char *argv[])
{
return netboot_common (TFTP, cmdtp, argc, argv);
}
@@ -116,7 +114,7 @@ U_BOOT_CMD_START(tftpboot)
U_BOOT_CMD_HELP(cmd_tftpboot_help)
U_BOOT_CMD_END
-int do_rarpb (cmd_tbl_t *cmdtp, int argc, char *argv[])
+static int do_rarpb (cmd_tbl_t *cmdtp, int argc, char *argv[])
{
return netboot_common (RARP, cmdtp, argc, argv);
}
@@ -129,7 +127,7 @@ U_BOOT_CMD_START(rarpboot)
U_BOOT_CMD_END
#ifdef CONFIG_NET_DHCP
-int do_dhcp (cmd_tbl_t *cmdtp, int argc, char *argv[])
+static int do_dhcp (cmd_tbl_t *cmdtp, int argc, char *argv[])
{
int size;
@@ -151,7 +149,7 @@ U_BOOT_CMD_END
#endif /* CONFIG_NET_DHCP */
#ifdef CONFIG_NET_NFS
-int do_nfs (cmd_tbl_t *cmdtp, int argc, char *argv[])
+static int do_nfs (cmd_tbl_t *cmdtp, int argc, char *argv[])
{
return netboot_common(NFS, cmdtp, argc, argv);
}
@@ -221,7 +219,7 @@ static void cdp_update_env(void)
}
-int do_cdp (cmd_tbl_t *cmdtp, int argc, char *argv[])
+static int do_cdp (cmd_tbl_t *cmdtp, int argc, char *argv[])
{
int r;
diff --git a/commands/partition.c b/commands/partition.c
index 199f0c7c50..c6130337b7 100644
--- a/commands/partition.c
+++ b/commands/partition.c
@@ -105,7 +105,7 @@ static int mtd_part_do_parse_one(struct partition *part, const char *str,
return 0;
}
-int do_addpart(cmd_tbl_t * cmdtp, int argc, char *argv[])
+static int do_addpart(cmd_tbl_t * cmdtp, int argc, char *argv[])
{
struct partition *part;
struct device_d *dev;
@@ -181,7 +181,7 @@ U_BOOT_CMD_START(addpart)
U_BOOT_CMD_HELP(cmd_addpart_help)
U_BOOT_CMD_END
-int do_delpart(cmd_tbl_t * cmdtp, int argc, char *argv[])
+static int do_delpart(cmd_tbl_t * cmdtp, int argc, char *argv[])
{
struct device_d *dev;
diff --git a/commands/reginfo.c b/commands/reginfo.c
index 506ad92f2c..781a92c62c 100644
--- a/commands/reginfo.c
+++ b/commands/reginfo.c
@@ -23,7 +23,7 @@
#include <common.h>
#include <command.h>
-int do_reginfo (cmd_tbl_t *cmdtp, int argc, char *argv[])
+static int do_reginfo (cmd_tbl_t *cmdtp, int argc, char *argv[])
{
reginfo();
return 0;
diff --git a/commands/sleep.c b/commands/sleep.c
index 52d146b76f..955eb718d6 100644
--- a/commands/sleep.c
+++ b/commands/sleep.c
@@ -24,7 +24,7 @@
#include <command.h>
#include <clock.h>
-int do_sleep (cmd_tbl_t *cmdtp, int argc, char *argv[])
+static int do_sleep (cmd_tbl_t *cmdtp, int argc, char *argv[])
{
uint64_t start;
ulong delay;
diff --git a/commands/splash.c b/commands/splash.c
index e3f04001b8..9fd4ded8c5 100644
--- a/commands/splash.c
+++ b/commands/splash.c
@@ -39,7 +39,7 @@ int splash_set_fb_data(struct fb_data *d)
return 0;
}
-int do_splash(cmd_tbl_t *cmdtp, int argc, char *argv[])
+static int do_splash(cmd_tbl_t *cmdtp, int argc, char *argv[])
{
ulong addr;
bmp_image_t *bmp;
diff --git a/commands/test.c b/commands/test.c
index c9ede75bb1..fb986d47d2 100644
--- a/commands/test.c
+++ b/commands/test.c
@@ -76,8 +76,7 @@ static int parse_opt(const char *opt)
return -1;
}
-int
-do_test (cmd_tbl_t *cmdtp, int argc, char *argv[])
+static int do_test (cmd_tbl_t *cmdtp, int argc, char *argv[])
{
char **ap;
int left, adv, expr, last_expr, neg, last_cmp, opt, zero;