summaryrefslogtreecommitdiffstats
path: root/otafault/test.cpp
diff options
context:
space:
mode:
authorTao Bao <tbao@google.com>2016-03-17 23:29:23 +0100
committerTao Bao <tbao@google.com>2016-03-17 23:29:23 +0100
commitce5868862a04a348967fb5bdad291b2b27b6e506 (patch)
tree301405afcb2c8947072b69d741ad39ac4a652da0 /otafault/test.cpp
parentDO NOT MERGE Control fault injection with config files instead of build flags (diff)
downloadandroid_bootable_recovery-ce5868862a04a348967fb5bdad291b2b27b6e506.tar
android_bootable_recovery-ce5868862a04a348967fb5bdad291b2b27b6e506.tar.gz
android_bootable_recovery-ce5868862a04a348967fb5bdad291b2b27b6e506.tar.bz2
android_bootable_recovery-ce5868862a04a348967fb5bdad291b2b27b6e506.tar.lz
android_bootable_recovery-ce5868862a04a348967fb5bdad291b2b27b6e506.tar.xz
android_bootable_recovery-ce5868862a04a348967fb5bdad291b2b27b6e506.tar.zst
android_bootable_recovery-ce5868862a04a348967fb5bdad291b2b27b6e506.zip
Diffstat (limited to '')
-rw-r--r--otafault/test.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/otafault/test.cpp b/otafault/test.cpp
index 6514782bf..a0f731517 100644
--- a/otafault/test.cpp
+++ b/otafault/test.cpp
@@ -17,18 +17,16 @@
#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
-#include <unistd.h>
#include "ota_io.h"
-int main(int /* argc */, char** /* argv */) {
+int main(int argc, char **argv) {
int fd = open("testdata/test.file", O_RDWR);
char buf[8];
- const char* out = "321";
+ char *out = "321";
int readv = ota_read(fd, buf, 4);
printf("Read returned %d\n", readv);
int writev = ota_write(fd, out, 4);
printf("Write returned %d\n", writev);
- close(fd);
return 0;
}