]>
git.saurik.com Git - apple/hfs.git/blob - tests/disk-image.h
5 // Created by Chris Suter on 8/12/15.
13 #include <TargetConditionals.h>
16 * One 'shared' disk image is created for any test to use, if it wants.
17 * To use this disk image, call disk_image_get(). To create a 'not-shared'
18 * disk image for use just within your test, call disk_image_create().
23 #define GB * (1024 * 1024 * 1024ULL)
24 #define TB * (1024 * 1024 * 1024 * 1024ULL)
26 #define SHARED_PATH "/tmp/shared.sparseimage"
27 #define SHARED_MOUNT "/tmp/mnt/shared"
29 typedef struct disk_image
{
30 const char *mount_point
;
35 typedef struct disk_image_opts
{
36 const char *partition_type
;
38 const char *mount_point
;
39 unsigned long long size
; // in bytes
42 disk_image_t
*disk_image_create(const char *path
, disk_image_opts_t
*opts
);
43 disk_image_t
*disk_image_get(void);
44 bool disk_image_cleanup(disk_image_t
*di
);
48 #endif /* disk_image_h_ */