X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;ds=sidebyside;f=cmd%2Fubi.c;h=c511a2fb7601f8d49b2a4353b48f289f04d23770;hb=dbbb1c43f26cb28b64df80b72fffbaf2801e8a30;hp=2b74a9814463f084037fa42c83ba6a6cc2f4b327;hpb=6f443330186676004148930b4dd77f1c2735bd36;p=oweals%2Fu-boot.git diff --git a/cmd/ubi.c b/cmd/ubi.c index 2b74a98144..c511a2fb76 100644 --- a/cmd/ubi.c +++ b/cmd/ubi.c @@ -101,7 +101,6 @@ static int ubi_check(char *name) return 1; } - static int verify_mkvol_req(const struct ubi_device *ubi, const struct ubi_mkvol_req *req) { @@ -415,7 +414,7 @@ static int ubi_dev_scan(struct mtd_info *info, const char *vid_header_offset) return 0; } -int ubi_detach(void) +static int ubi_detach(void) { #ifdef CONFIG_CMD_UBIFS /* @@ -473,14 +472,8 @@ static int do_ubi(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) if (argc < 2) return CMD_RET_USAGE; - - if (strcmp(argv[1], "detach") == 0) { - if (argc < 2) - return CMD_RET_USAGE; - + if (strcmp(argv[1], "detach") == 0) return ubi_detach(); - } - if (strcmp(argv[1], "part") == 0) { const char *vid_header_offset = NULL;