diff options
author | Elliott Hughes <enh@google.com> | 2015-03-16 13:47:14 -0700 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2015-03-16 13:47:14 -0700 |
commit | 1b9cc5b2e1dada2d37d9f63ac652927704d2919e (patch) | |
tree | 820b68768761ba072c4b59975867e6bd44a59538 /toolbox | |
parent | c353c912a7ed29d53305412b1450136a25f922bd (diff) | |
download | system_core-1b9cc5b2e1dada2d37d9f63ac652927704d2919e.zip system_core-1b9cc5b2e1dada2d37d9f63ac652927704d2919e.tar.gz system_core-1b9cc5b2e1dada2d37d9f63ac652927704d2919e.tar.bz2 |
Remove obsolete smd tool.
It's basically "echo" with a redirect, and it hasn't been touched since
cupcake. Could be replaced with a shell script if need be.
Change-Id: I75b663ea4be3d7cd9581faa6ef3979de28e68dfb
Diffstat (limited to 'toolbox')
-rw-r--r-- | toolbox/Android.mk | 1 | ||||
-rw-r--r-- | toolbox/smd.c | 42 |
2 files changed, 0 insertions, 43 deletions
diff --git a/toolbox/Android.mk b/toolbox/Android.mk index 424ba23..b822ea0 100644 --- a/toolbox/Android.mk +++ b/toolbox/Android.mk @@ -63,7 +63,6 @@ OUR_TOOLS := \ schedtop \ sendevent \ setprop \ - smd \ start \ stop \ top \ diff --git a/toolbox/smd.c b/toolbox/smd.c deleted file mode 100644 index 343dea7..0000000 --- a/toolbox/smd.c +++ /dev/null @@ -1,42 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <fcntl.h> -#include <errno.h> -#include <unistd.h> - -int smd_main(int argc, char **argv) -{ - int fd, len, r, port = 0; - char devname[32]; - argc--; - argv++; - - if((argc > 0) && (argv[0][0] == '-')) { - port = atoi(argv[0] + 1); - argc--; - argv++; - } - - sprintf(devname,"/dev/smd%d",port); - fd = open(devname, O_WRONLY); - if(fd < 0) { - fprintf(stderr,"failed to open smd0 - %s\n", - strerror(errno)); - return -1; - } - while(argc > 0) { - len = strlen(argv[0]); - r = write(fd, argv[0], len); - if(r != len) { - fprintf(stderr,"failed to write smd0 (%d) %s\n", - r, strerror(errno)); - return -1; - } - argc--; - argv++; - write(fd, argc ? " " : "\r", 1); - } - close(fd); - return 0; -} |