summaryrefslogtreecommitdiffstats
path: root/otafault/test.cpp
diff options
context:
space:
mode:
authorJed Estep <jestep@google.com>2015-12-16 01:04:53 +0100
committerJed Estep <jestep@google.com>2016-03-19 01:58:25 +0100
commitff6df890a2a01bf3bf56d3f430b17a5ef69055cf (patch)
treed639d516e51ec2df2f6e2e26b0643f982e6ae2b6 /otafault/test.cpp
parentrecovery: Move SwipeDetector into common location (diff)
downloadandroid_bootable_recovery-ff6df890a2a01bf3bf56d3f430b17a5ef69055cf.tar
android_bootable_recovery-ff6df890a2a01bf3bf56d3f430b17a5ef69055cf.tar.gz
android_bootable_recovery-ff6df890a2a01bf3bf56d3f430b17a5ef69055cf.tar.bz2
android_bootable_recovery-ff6df890a2a01bf3bf56d3f430b17a5ef69055cf.tar.lz
android_bootable_recovery-ff6df890a2a01bf3bf56d3f430b17a5ef69055cf.tar.xz
android_bootable_recovery-ff6df890a2a01bf3bf56d3f430b17a5ef69055cf.tar.zst
android_bootable_recovery-ff6df890a2a01bf3bf56d3f430b17a5ef69055cf.zip
Diffstat (limited to 'otafault/test.cpp')
-rw-r--r--otafault/test.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/otafault/test.cpp b/otafault/test.cpp
index a0f731517..6514782bf 100644
--- a/otafault/test.cpp
+++ b/otafault/test.cpp
@@ -17,16 +17,18 @@
#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];
- char *out = "321";
+ const 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;
}