From 58ae4bb2eaa62673c7e462fdf9f50d3e31aefbe8 Mon Sep 17 00:00:00 2001 From: "S.J.R. van Schaik" Date: Wed, 14 Jun 2017 13:08:19 +0200 Subject: [PATCH] shell: ftl: remove ftl test command --- source/shell/ftl.c | 37 ------------------------------------- 1 file changed, 37 deletions(-) diff --git a/source/shell/ftl.c b/source/shell/ftl.c index de4bb64..5610113 100644 --- a/source/shell/ftl.c +++ b/source/shell/ftl.c @@ -13,11 +13,9 @@ #include static void do_ftl_mount(const char *s); -static void do_ftl_test(const char *s); static struct cmd ftl_cmds[] = { { "mount", do_ftl_mount }, - { "test", do_ftl_test }, { NULL, NULL }, }; @@ -38,41 +36,6 @@ static void do_ftl_mount(const char *s) } } -static void do_ftl_test(const char *s) -{ - uint8_t page[4096]; - uint32_t n; - - (void)s; - - if (!flash) { - fprintf(stderr, "error: no flash device probed.\n"); - return; - } - - memset(page, 0xff, 4096); - memcpy(page, "test", 4); - - /*for (n = 0; n < 64; ++n) { - if (flash_write(dev, n << 12, page, sizeof page) == 0) - printf("unable to write the upage\n"); - } - - ftl_trim(dev->priv, 0x29);*/ - - for (n = 0; n < 64; ++n) { - if (ftl_is_mapped(flash->priv, n)) - printf("%x [OK]\n", n); - else - printf("%x [FAIL]\n", n); - } - - printf("Capacity: %u/%u bytes (%u%% used)\n", - flash_get_size(flash), - flash_get_capacity(flash), - 100 * flash_get_size(flash) / flash_get_capacity(flash)); -} - void do_ftl_cmd(const char *line) { cmd_exec(ftl_cmds, line);