From 3d4ef38de2f65e9d122e1c40221f303ade0eac97 Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Thu, 15 Oct 2015 14:34:19 +0200 Subject: sparse: Rename the file and header The Android sparse image format is currently supported through a file called aboot, which isn't really such a great name, since the sparse image format is only used for transferring data with fastboot. Rename the file and header to a file called "sparse", which also makes it consistent with the header defining the image structures. Signed-off-by: Maxime Ripard Reviewed-by: Tom Rini --- include/aboot.h | 35 ----------------------------------- include/image-sparse.h | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 35 deletions(-) delete mode 100644 include/aboot.h create mode 100644 include/image-sparse.h (limited to 'include') diff --git a/include/aboot.h b/include/aboot.h deleted file mode 100644 index 0382f5b..0000000 --- a/include/aboot.h +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright 2014 Broadcom Corporation. - * - * SPDX-License-Identifier: GPL-2.0+ - */ - -#include -#include - -#define ROUNDUP(x, y) (((x) + ((y) - 1)) & ~((y) - 1)) - -typedef struct sparse_storage { - unsigned int block_sz; - unsigned int start; - unsigned int size; - const char *name; - - int (*write)(struct sparse_storage *storage, void *priv, - unsigned int offset, unsigned int size, - char *data); -} sparse_storage_t; - -static inline int is_sparse_image(void *buf) -{ - sparse_header_t *s_header = (sparse_header_t *)buf; - - if ((le32_to_cpu(s_header->magic) == SPARSE_HEADER_MAGIC) && - (le16_to_cpu(s_header->major_version) == 1)) - return 1; - - return 0; -} - -int store_sparse_image(sparse_storage_t *storage, void *storage_priv, - unsigned int session_id, void *data); diff --git a/include/image-sparse.h b/include/image-sparse.h new file mode 100644 index 0000000..0382f5b --- /dev/null +++ b/include/image-sparse.h @@ -0,0 +1,35 @@ +/* + * Copyright 2014 Broadcom Corporation. + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#include +#include + +#define ROUNDUP(x, y) (((x) + ((y) - 1)) & ~((y) - 1)) + +typedef struct sparse_storage { + unsigned int block_sz; + unsigned int start; + unsigned int size; + const char *name; + + int (*write)(struct sparse_storage *storage, void *priv, + unsigned int offset, unsigned int size, + char *data); +} sparse_storage_t; + +static inline int is_sparse_image(void *buf) +{ + sparse_header_t *s_header = (sparse_header_t *)buf; + + if ((le32_to_cpu(s_header->magic) == SPARSE_HEADER_MAGIC) && + (le16_to_cpu(s_header->major_version) == 1)) + return 1; + + return 0; +} + +int store_sparse_image(sparse_storage_t *storage, void *storage_priv, + unsigned int session_id, void *data); -- cgit v1.1