diff options
author | Mike Frysinger <vapier@chromium.org> | 2019-06-25 15:37:09 -0400 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2019-06-26 06:39:48 +0000 |
commit | 89acb80ff17f73399daf136970903a9fc67d07c3 (patch) | |
tree | 9c92ba3f73c4f2659e2f6fc9d6324f6b751a5d24 | |
parent | 98dfade54684f1141f129d1af93dfd6e0e8c6455 (diff) | |
download | vboot-89acb80ff17f73399daf136970903a9fc67d07c3.tar.gz |
futility: drop mtd support via android_mtdutils
No one is using this, so drop the dependency.
BUG=chromium:978563
TEST=cq passes
BRANCH=None
Change-Id: I50595675f7f24f8af06a5a8ec3de21690e2ecb34
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/1677105
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Joel Kitching <kitching@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
-rw-r--r-- | Makefile | 5 | ||||
-rw-r--r-- | futility/dump_kernel_config_lib.c | 37 |
2 files changed, 0 insertions, 42 deletions
@@ -179,11 +179,6 @@ ifneq (${PD_SYNC},) CFLAGS += -DPD_SYNC endif -ifneq (${USE_MTD},) -CFLAGS += -DUSE_MTD -LDLIBS += -lmtdutils -endif - ifneq (${TPM2_MODE},) CFLAGS += -DTPM2_MODE endif diff --git a/futility/dump_kernel_config_lib.c b/futility/dump_kernel_config_lib.c index 8a348972..f278f051 100644 --- a/futility/dump_kernel_config_lib.c +++ b/futility/dump_kernel_config_lib.c @@ -20,12 +20,6 @@ #include "vboot_api.h" #include "vboot_host.h" -#ifdef USE_MTD -#include <linux/major.h> -#include <mtd/mtd-user.h> -#include <mtdutils.h> -#endif - typedef ssize_t (*ReadFullyFn)(void *ctx, void *buf, size_t count); static ssize_t ReadFullyWithRead(void *ctx, void *buf, size_t count) @@ -45,14 +39,6 @@ static ssize_t ReadFullyWithRead(void *ctx, void *buf, size_t count) return nr_read; } -#ifdef USE_MTD -static ssize_t ReadFullyWithMtdRead(void *ctx, void *buf, size_t count) -{ - MtdReadContext *mtd_ctx = (MtdReadContext*)ctx; - return mtd_read_data(mtd_ctx, buf, count); -} -#endif - /* Skip the stream by calling |read_fn| many times. Return 0 on success. */ static int SkipWithRead(void *ctx, ReadFullyFn read_fn, size_t count) { @@ -146,32 +132,9 @@ char *FindKernelConfig(const char *infile, uint64_t kernel_body_load_address) void *ctx = &fd; ReadFullyFn read_fn = ReadFullyWithRead; -#ifdef USE_MTD - struct stat stat_buf; - if (fstat(fd, &stat_buf)) { - VbExError("Cannot stat %s\n", infile); - return NULL; - } - - int is_mtd = (major(stat_buf.st_rdev) == MTD_CHAR_MAJOR); - if (is_mtd) { - ctx = mtd_read_descriptor(fd, infile); - if (!ctx) { - VbExError("Cannot read from MTD device %s\n", infile); - return NULL; - } - read_fn = ReadFullyWithMtdRead; - } -#endif - newstr = FindKernelConfigFromStream(ctx, read_fn, kernel_body_load_address); -#ifdef USE_MTD - if (is_mtd) { - mtd_read_close(ctx); - } -#endif close(fd); return newstr; |