1 /* 2 * Copyright (c) 2022, Arm Limited and Contributors. All rights reserved. 3 * 4 * SPDX-License-Identifier: BSD-3-Clause 5 */ 6 7 #ifndef MEDIA_DISK_FORMATTER_H 8 #define MEDIA_DISK_FORMATTER_H 9 10 #include <stddef.h> 11 #include <stdint.h> 12 13 #ifdef __cplusplus 14 extern "C" { 15 #endif 16 17 /** 18 * @brief Format a storage volume by cloning a disk image 19 * 20 * @param[in] dev_handle IO device handle 21 * @param[in] io_spec Opaque volume spec 22 * @param[in] source_image The source disk image to clone 23 * @param[in] source_image_size The size of the source image 24 * 25 * @return 0 on success 26 */ 27 int disk_formatter_clone( 28 uintptr_t dev_handle, 29 uintptr_t io_spec, 30 const uint8_t *source_image, 31 size_t source_image_size); 32 33 #ifdef __cplusplus 34 } 35 #endif 36 37 #endif /* MEDIA_DISK_FORMATTER_H */ 38