Lines Matching refs:ctx

8 pub(super) fn create(ctx: &DADKExecContext, skip_if_exists: bool) -> Result<()> {  in create()
9 let disk_image_path = ctx.disk_image_path(); in create()
23 let image_size = ctx.disk_image_size(); in create()
28 let r = if ctx.rootfs().partition.image_should_be_partitioned() { in create()
29 create_partitioned_image(ctx, &disk_image_path) in create()
31 create_unpartitioned_image(ctx, &disk_image_path) in create()
40 pub(super) fn delete(ctx: &DADKExecContext, skip_if_not_exists: bool) -> Result<()> { in delete()
41 let disk_image_path = ctx.disk_image_path(); in delete()
58 pub fn mount(ctx: &DADKExecContext) -> Result<()> { in mount()
59 let disk_image_path = ctx.disk_image_path(); in mount()
66 let disk_mount_path = ctx.disk_mount_path(); in mount()
72 let partitioned = ctx.rootfs().partition.image_should_be_partitioned(); in mount()
75 mount_partitioned_image(ctx, &disk_image_path, &disk_mount_path)? in mount()
77 mount_unpartitioned_image(ctx, &disk_image_path, &disk_mount_path)? in mount()
84 ctx: &DADKExecContext, in mount_partitioned_image()
100 mount_unpartitioned_image(ctx, &dev_path, disk_mount_path)?; in mount_partitioned_image()
124 pub fn umount(ctx: &DADKExecContext) -> Result<()> { in umount()
125 let disk_img_path = ctx.disk_image_path(); in umount()
126 let disk_mount_path = ctx.disk_mount_path(); in umount()
195 fn create_partitioned_image(ctx: &DADKExecContext, disk_image_path: &PathBuf) -> Result<()> { in create_partitioned_image()
196 let part_type = ctx.rootfs().partition.partition_type; in create_partitioned_image()
208 let fs_type = ctx.rootfs().metadata.fs_type; in create_partitioned_image()
214 fn create_unpartitioned_image(ctx: &DADKExecContext, disk_image_path: &PathBuf) -> Result<()> { in create_unpartitioned_image()
216 let fs_type = ctx.rootfs().metadata.fs_type; in create_unpartitioned_image()
247 pub fn check_disk_image_exists(ctx: &DADKExecContext) -> Result<()> { in check_disk_image_exists()
248 let disk_image_path = ctx.disk_image_path(); in check_disk_image_exists()
257 pub fn show_mount_point(ctx: &DADKExecContext) -> Result<()> { in show_mount_point()
258 let disk_mount_path = ctx.disk_mount_path(); in show_mount_point()
263 pub fn show_loop_device(ctx: &DADKExecContext) -> Result<()> { in show_loop_device()
264 let disk_image_path = ctx.disk_image_path(); in show_loop_device()