aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbnewbold <bnewbold@robocracy.org>2014-12-28 17:39:48 +0100
committerbnewbold <bnewbold@robocracy.org>2014-12-28 17:39:48 +0100
commit7245f268334f818f28ec5e9c00837fdada0ecd95 (patch)
tree4a2e2fb8809adbe7eeaa04c4350adcd70586d8cf
parent4475228fcf7f846e08883d1589f90cf5a38183e6 (diff)
downloaduioctl-master.zip
uioctl-master.tar.gz
remove unimplemented 'list' modeHEADmaster
-rw-r--r--README1
-rw-r--r--uioctl.c15
2 files changed, 2 insertions, 14 deletions
diff --git a/README b/README
index a8fbf4f..7c80bbb 100644
--- a/README
+++ b/README
@@ -26,7 +26,6 @@ little-endian by default
./uioctl /dev/uio0 0 -n 100 -w 1 -r 0
./uioctl /dev/uio0 0x818 0
./uioctl /dev/uio0 -m
-./uioctl -l
BUT WAIT? hexdump -C /dev/uio0 -s 0x
diff --git a/uioctl.c b/uioctl.c
index bf4fe75..2a38d05 100644
--- a/uioctl.c
+++ b/uioctl.c
@@ -18,6 +18,7 @@
* Changelog:
* 2013-12-04: bnewbold: Initial version; missing width management, list mode
* 2013-12-19: bnewbold: GPLv3; fix mmap size
+ * 2014-12-28: bnewbold: remove unimplemented 'list' mode
*
*/
@@ -38,17 +39,15 @@
enum mode_type {
MODE_READ,
MODE_WRITE,
- MODE_LIST,
MODE_MONITOR
};
static void usage(int exit_status) {
fprintf(exit_status == EXIT_SUCCESS ? stdout : stderr,
- "Usage: %s [options] [-l] [/dev/uioX [-m] [<addr> [<value>]]]\n"
+ "Usage: %s [options] [/dev/uioX [-m] [<addr> [<value>]]]\n"
"\n"
"Functions:\n"
" monitor (-m) the device for interrupts\n"
- " list (-l) all devices and their mappings\n"
" read words from <addr>\n"
" write <value> to <addr> (will zero-pad word width)\n"
"\n"
@@ -62,14 +61,6 @@ static void usage(int exit_status) {
exit(exit_status);
}
-static void list_devices() {
- // TODO:
- // - try to list /sys/devices/uio*
- // - for each in the above, print memory regions
- fprintf(stderr, "listing not yet implemented\n");
- exit(EXIT_FAILURE);
-}
-
static void monitor(char *fpath, int forever) {
char buf[4];
int bytes;
@@ -123,8 +114,6 @@ int main(int argc, char *argv[]) {
switch(c) {
case 'h':
usage(EXIT_SUCCESS);
- case 'l':
- list_devices();
case 'm':
mode = MODE_MONITOR;
break;