diff options
author | Jed Estep <jestep@google.com> | 2016-03-21 22:37:33 +0100 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2016-03-21 22:37:33 +0100 |
commit | 6f7876816b2322169432658235ebf7882ced0564 (patch) | |
tree | 596945143de9306b9e53163aef466cc8b5f429e5 /otafault/test.cpp | |
parent | Merge "Fix: full ota package larger than 2GB fails to upgrade" (diff) | |
parent | Control fault injection with config files instead of build flags (diff) | |
download | android_bootable_recovery-6f7876816b2322169432658235ebf7882ced0564.tar android_bootable_recovery-6f7876816b2322169432658235ebf7882ced0564.tar.gz android_bootable_recovery-6f7876816b2322169432658235ebf7882ced0564.tar.bz2 android_bootable_recovery-6f7876816b2322169432658235ebf7882ced0564.tar.lz android_bootable_recovery-6f7876816b2322169432658235ebf7882ced0564.tar.xz android_bootable_recovery-6f7876816b2322169432658235ebf7882ced0564.tar.zst android_bootable_recovery-6f7876816b2322169432658235ebf7882ced0564.zip |
Diffstat (limited to '')
-rw-r--r-- | otafault/test.cpp | 6 |
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; } |