Added some more signatures
This commit is contained in:
22
src/disk.h
22
src/disk.h
@@ -6,6 +6,18 @@
|
||||
#include <stdint.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
/// @brief The information about a disk.
|
||||
typedef struct {
|
||||
/// @brief The virtual size of the disk.
|
||||
uint64_t virtual_size;
|
||||
|
||||
/// @brief The actual size of the disk.
|
||||
uint64_t actual_size;
|
||||
|
||||
/// @brief The path to the backing file of the disk. This is NULL if the disk is not backed.
|
||||
char* backing_file;
|
||||
} DiskInfo;
|
||||
|
||||
/// @brief Creates an empty disk at the given path, with the given size and with the given permissions.
|
||||
/// @param path The path to the disk to create.
|
||||
/// @param size The size of the disk to create.
|
||||
@@ -30,3 +42,13 @@ Result trim_disk(const char* path);
|
||||
/// @param backing_disk The new path to the backing disk.
|
||||
/// @return The result of the operation.
|
||||
Result rebase_disk(const char* path, const char* backing_disk);
|
||||
|
||||
/// @brief Gathers information about a disk.
|
||||
/// @param path The path to the disk to gather information about.
|
||||
/// @param out_info The information about the disk.
|
||||
/// @return The result of the operation.
|
||||
Result get_disk_info(const char* path, DiskInfo* out_info);
|
||||
|
||||
/// @brief Frees the resources used by the given disk information.
|
||||
/// @param info The disk information to free.
|
||||
void free_disk_info(DiskInfo* info);
|
||||
|
Reference in New Issue
Block a user