aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Ball <cjb@laptop.org>2012-02-12 11:49:53 -0500
committerChris Ball <cjb@laptop.org>2012-02-12 12:03:30 -0500
commit45541d55fa50e385894d22960f2526b6c7f68d52 (patch)
tree3920b69139ae25b43cd74ea7e86bace234c89ffc
parenta8bfde77e0e275070791138d60b75d1cc293daf0 (diff)
downloadmmc-utils-45541d55fa50e385894d22960f2526b6c7f68d52.tar.gz
Hook up "mmc extcsd read/write" commands.
Signed-off-by: Chris Ball <cjb@laptop.org>
-rw-r--r--Makefile2
-rw-r--r--mmc.c12
2 files changed, 13 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 63f97b5..34c5ec3 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
CC = gcc
AM_CFLAGS = -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
CFLAGS = -g -O0
-objects = mmc.o mmc_cmds.h
+objects = mmc.o mmc_cmds.o
CHECKFLAGS= -Wall -Werror -Wuninitialized -Wundef
diff --git a/mmc.c b/mmc.c
index 787df1d..b2dd41b 100644
--- a/mmc.c
+++ b/mmc.c
@@ -21,6 +21,8 @@
#include <stdlib.h>
#include <string.h>
+#include "mmc_cmds.h"
+
#define MMC_VERSION "0.1"
#define BASIC_HELP 0
@@ -48,6 +50,16 @@ static struct Command commands[] = {
/*
* avoid short commands different for the case only
*/
+ { do_read_extcsd, -1,
+ "extcsd read", "<device>\n"
+ "Print extcsd data from <device>.",
+ NULL
+ },
+ { do_write_extcsd, -1,
+ "extcsd write", "<device>\n"
+ "Write extcsd data to <device>.",
+ NULL
+ },
{ 0, 0, 0, 0 }
};