aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2019-03-02 17:56:06 -0600
committerRob Landley <rob@landley.net>2019-03-02 17:56:06 -0600
commit0ef76aab5ecf7de5522095dbc33dc8b93cc7bc43 (patch)
tree663ff20306143fe7c7f74997f7dac8449011a10e
parentd588ba74439604cf29100aec7cd1da640a5d6fe5 (diff)
downloadtoybox-0ef76aab5ecf7de5522095dbc33dc8b93cc7bc43.tar.gz
Promote devmem.
-rw-r--r--toys/other/devmem.c (renamed from toys/pending/devmem.c)3
1 files changed, 2 insertions, 1 deletions
diff --git a/toys/pending/devmem.c b/toys/other/devmem.c
index d5b7bdb4..a6f9f606 100644
--- a/toys/pending/devmem.c
+++ b/toys/other/devmem.c
@@ -6,7 +6,7 @@ USE_DEVMEM(NEWTOY(devmem, "<1>3", TOYFLAG_USR|TOYFLAG_BIN))
config DEVMEM
bool "devmem"
- default n
+ default y
help
usage: devmem ADDR [WIDTH [DATA]]
@@ -45,6 +45,7 @@ void devmem_main(void)
p = map + (addr & (page_size - 1));
close(fd);
+ // Not using peek()/poke() because registers care about size of read/write
if (writing) {
if (bytes == 1) *(char *)p = data;
else if (bytes == 2) *(short *)p = data;