summaryrefslogtreecommitdiff
path: root/common/cmd_reiser.c
diff options
context:
space:
mode:
authorroy zang <tie-fei.zang@freescale.com>2007-02-28 16:46:48 +0800
committerZang Tiefei <roy@bus.ap.freescale.net>2007-02-28 16:46:48 +0800
commit00b574bdc8c54dbc9e03f63c24f62955d483e3ef (patch)
treedc49c4219bafd43c2ace6c5a3e6745d7b7264194 /common/cmd_reiser.c
parent30bddf2c46ab2e824f217a38db033118ac4622af (diff)
parentccbc7036648e465697ca298ba51e0e76dda352a0 (diff)
downloadu-boot-imx-00b574bdc8c54dbc9e03f63c24f62955d483e3ef.zip
u-boot-imx-00b574bdc8c54dbc9e03f63c24f62955d483e3ef.tar.gz
u-boot-imx-00b574bdc8c54dbc9e03f63c24f62955d483e3ef.tar.bz2
Merge branch 'master' into hpc2
Conflicts: drivers/Makefile Fix the merge conflict in file drivers/Makefile Signed-off-by: Roy Zang <tie-fei.zang@freescale.com>
Diffstat (limited to 'common/cmd_reiser.c')
-rw-r--r--common/cmd_reiser.c40
1 files changed, 3 insertions, 37 deletions
diff --git a/common/cmd_reiser.c b/common/cmd_reiser.c
index 508ffcb..09c86e6 100644
--- a/common/cmd_reiser.c
+++ b/common/cmd_reiser.c
@@ -35,6 +35,7 @@
#include <linux/ctype.h>
#include <asm/byteorder.h>
#include <reiserfs.h>
+#include <part.h>
#ifndef CONFIG_DOS_PARTITION
#error DOS partition support must be selected
@@ -48,41 +49,6 @@
#define PRINTF(fmt,args...)
#endif
-static block_dev_desc_t *get_dev (char* ifname, int dev)
-{
-#if (CONFIG_COMMANDS & CFG_CMD_IDE)
- if (strncmp(ifname,"ide",3)==0) {
- extern block_dev_desc_t * ide_get_dev(int dev);
- return((dev >= CFG_IDE_MAXDEVICE) ? NULL : ide_get_dev(dev));
- }
-#endif
-#if (CONFIG_COMMANDS & CFG_CMD_SCSI)
- if (strncmp(ifname,"scsi",4)==0) {
- extern block_dev_desc_t * scsi_get_dev(int dev);
- return((dev >= CFG_SCSI_MAXDEVICE) ? NULL : scsi_get_dev(dev));
- }
-#endif
-#if ((CONFIG_COMMANDS & CFG_CMD_USB) && defined(CONFIG_USB_STORAGE))
- if (strncmp(ifname,"usb",3)==0) {
- extern block_dev_desc_t * usb_stor_get_dev(int dev);
- return((dev >= USB_MAX_STOR_DEV) ? NULL : usb_stor_get_dev(dev));
- }
-#endif
-#if defined(CONFIG_MMC)
- if (strncmp(ifname,"mmc",3)==0) {
- extern block_dev_desc_t * mmc_get_dev(int dev);
- return((dev >= 1) ? NULL : mmc_get_dev(dev));
- }
-#endif
-#if defined(CONFIG_SYSTEMACE)
- if (strcmp(ifname,"ace")==0) {
- extern block_dev_desc_t * systemace_get_dev(int dev);
- return((dev >= 1) ? NULL : systemace_get_dev(dev));
- }
-#endif
- return NULL;
-}
-
int do_reiserls (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
{
char *filename = "/";
@@ -97,7 +63,7 @@ int do_reiserls (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
return 1;
}
dev = (int)simple_strtoul (argv[2], &ep, 16);
- dev_desc=get_dev(argv[1],dev);
+ dev_desc = get_dev(argv[1],dev);
if (dev_desc == NULL) {
printf ("\n** Block device %s %d not supported\n", argv[1], dev);
@@ -196,7 +162,7 @@ int do_reiserload (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
}
dev = (int)simple_strtoul (argv[2], &ep, 16);
- dev_desc=get_dev(argv[1],dev);
+ dev_desc = get_dev(argv[1],dev);
if (dev_desc==NULL) {
printf ("\n** Block device %s %d not supported\n", argv[1], dev);
return 1;