summaryrefslogtreecommitdiffstats
path: root/otafault/test.cpp
diff options
context:
space:
mode:
authorTao Bao <tbao@google.com>2016-03-17 23:57:55 +0100
committerandroid-build-merger <android-build-merger@google.com>2016-03-17 23:57:55 +0100
commit156de0473efb2150f72743d925dc61a3e6fb9214 (patch)
tree4529429bcadb33c5abee36f31aed6bee9bbad7ff /otafault/test.cpp
parentresolve merge conflicts of f73abf3 to nyc-dev-plus-aosp (diff)
parentresolve merge conflicts of ce58688 to nyc-dev-plus-aosp (diff)
downloadandroid_bootable_recovery-156de0473efb2150f72743d925dc61a3e6fb9214.tar
android_bootable_recovery-156de0473efb2150f72743d925dc61a3e6fb9214.tar.gz
android_bootable_recovery-156de0473efb2150f72743d925dc61a3e6fb9214.tar.bz2
android_bootable_recovery-156de0473efb2150f72743d925dc61a3e6fb9214.tar.lz
android_bootable_recovery-156de0473efb2150f72743d925dc61a3e6fb9214.tar.xz
android_bootable_recovery-156de0473efb2150f72743d925dc61a3e6fb9214.tar.zst
android_bootable_recovery-156de0473efb2150f72743d925dc61a3e6fb9214.zip
Diffstat (limited to 'otafault/test.cpp')
-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;
}