Merge "otafault: Clean up header inclusion."

This commit is contained in:
Tao Bao
2017-09-29 16:10:41 +00:00
committed by Gerrit Code Review
6 changed files with 18 additions and 20 deletions

View File

@@ -18,8 +18,6 @@ include $(CLEAR_VARS)
otafault_static_libs := \
libziparchive \
libz \
libselinux \
libbase \
liblog

View File

@@ -14,16 +14,14 @@
* limitations under the License.
*/
#include "config.h"
#include <map>
#include <string>
#include <stdio.h>
#include <unistd.h>
#include <android-base/stringprintf.h>
#include <ziparchive/zip_archive.h>
#include "config.h"
#include "ota_io.h"
#define OTAIO_MAX_FNAME_SIZE 128

View File

@@ -15,13 +15,13 @@
*/
/*
* Read configuration files in the OTA package to determine which files, if any, will trigger errors.
* Read configuration files in the OTA package to determine which files, if any, will trigger
* errors.
*
* OTA packages can be modified to trigger errors by adding a top-level
* directory called .libotafault, which may optionally contain up to three
* files called READ, WRITE, and FSYNC. Each one of these optional files
* contains the name of a single file on the device disk which will cause
* an IO error on the first call of the appropriate I/O action to that file.
* OTA packages can be modified to trigger errors by adding a top-level directory called
* .libotafault, which may optionally contain up to three files called READ, WRITE, and FSYNC.
* Each one of these optional files contains the name of a single file on the device disk which
* will cause an IO error on the first call of the appropriate I/O action to that file.
*
* Example:
* ota.zip
@@ -29,9 +29,9 @@
* .libotafault
* WRITE
*
* If the contents of the file WRITE were /system/build.prop, the first write
* action to /system/build.prop would fail with EIO. Note that READ and
* FSYNC files are absent, so these actions will not cause an error.
* If the contents of the file WRITE were /system/build.prop, the first write action to
* /system/build.prop would fail with EIO. Note that READ and FSYNC files are absent, so these
* actions will not cause an error.
*/
#ifndef _UPDATER_OTA_IO_CFG_H_
@@ -39,8 +39,6 @@
#include <string>
#include <stdbool.h>
#include <ziparchive/zip_archive.h>
#define OTAIO_BASE_DIR ".libotafault"

View File

@@ -18,15 +18,17 @@
#include <errno.h>
#include <fcntl.h>
#include <stdint.h>
#include <stdio.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include <map>
#include <memory>
#include <mutex>
#include <android-base/thread_annotations.h>
#include "config.h"
static std::mutex filename_mutex;

View File

@@ -23,8 +23,9 @@
#ifndef _UPDATER_OTA_IO_H_
#define _UPDATER_OTA_IO_H_
#include <stddef.h>
#include <stdio.h>
#include <sys/stat.h>
#include <sys/stat.h> // mode_t
#include <memory>

View File

@@ -14,9 +14,10 @@
* limitations under the License.
*/
#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include "ota_io.h"