diff options
author | Richard Jones <rjones@redhat.com> | 2009-11-04 23:15:26 +0000 |
---|---|---|
committer | Richard Jones <rjones@redhat.com> | 2009-11-10 16:32:20 +0000 |
commit | b1e1ca2f74a921b3f784537d59c617df29ea1d60 (patch) | |
tree | 2aff7ca53f4314e5dcb12236a86583a9c00777f2 /regressions | |
parent | b03995b67f9bc23d066b282bb7dad9b7c71c90da (diff) | |
download | libguestfs-b1e1ca2f74a921b3f784537d59c617df29ea1d60.tar.gz libguestfs-b1e1ca2f74a921b3f784537d59c617df29ea1d60.tar.xz libguestfs-b1e1ca2f74a921b3f784537d59c617df29ea1d60.zip |
Generic partition creation interface.
This commit introduces a generic partition creation interface
which should be future-proof and extensible, and partially
replaces the old sfdisk-based interface.
The implementation is based on parted but is hopefully not too
dependent on the particulars of parted.
The following new calls are introduced:
guestfs_part_init:
Initialize a disk with a partition table. Unlike the sfdisk-
based interface, we also support GPT and other partition
types, which is essential to scale to devices larger than 2TB.
guestfs_part_add: Add a partition to an existing disk.
guestfs_part_disk:
Convenience function which combines part_init & part_add,
creating a single partition that covers the whole disk.
guestfs_part_set_bootable:
guestfs_part_set_name:
Set various aspects of existing partitions.
guestfs_part_list:
List partitions on a device. This returns a programming-friendly
list of partition structs (in contrast to sfdisk-l which cannot
be parsed).
guestfs_part_get_parttype:
Return the partition table type, eg. "msdos" or "gpt".
The following calls are planned, but not added currently:
guestfs_part_get_bootable
guestfs_part_get_name
guestfs_part_set_type
guestfs_part_get_type
Diffstat (limited to 'regressions')
-rwxr-xr-x | regressions/rhbz503169c10.sh | 2 | ||||
-rwxr-xr-x | regressions/rhbz503169c13.sh | 2 | ||||
-rwxr-xr-x | regressions/test-cancellation-upload-daemoncancels.sh | 2 | ||||
-rwxr-xr-x | regressions/test-remote.sh | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/regressions/rhbz503169c10.sh b/regressions/rhbz503169c10.sh index 91284e0a..5cf70699 100755 --- a/regressions/rhbz503169c10.sh +++ b/regressions/rhbz503169c10.sh @@ -26,7 +26,7 @@ dd if=/dev/zero of=test1.img bs=1024k count=10 ../fish/guestfish -a test1.img <<EOF launch -sfdisk /dev/sda 0 0 0 , +part-disk /dev/sda mbr mkfs ext2 /dev/sda1 mount /dev/sda1 / ll /../dev/console diff --git a/regressions/rhbz503169c13.sh b/regressions/rhbz503169c13.sh index 7bace822..d360d5c2 100755 --- a/regressions/rhbz503169c13.sh +++ b/regressions/rhbz503169c13.sh @@ -31,7 +31,7 @@ dd if=/dev/zero of=test1.img bs=1024k count=10 ../fish/guestfish -a test1.img <<EOF run -sfdisk /dev/sda 0 0 0 , +part-disk /dev/sda mbr mkfs ext2 /dev/sda1 mount /dev/sda1 / mkdir /dev diff --git a/regressions/test-cancellation-upload-daemoncancels.sh b/regressions/test-cancellation-upload-daemoncancels.sh index 835c3bb4..296d3686 100755 --- a/regressions/test-cancellation-upload-daemoncancels.sh +++ b/regressions/test-cancellation-upload-daemoncancels.sh @@ -28,7 +28,7 @@ rm -f test.img alloc test.img 10M run -sfdiskM /dev/sda , +part-disk /dev/sda mbr mkfs ext2 /dev/sda1 mount /dev/sda1 / diff --git a/regressions/test-remote.sh b/regressions/test-remote.sh index ed02ccf4..d778a07a 100755 --- a/regressions/test-remote.sh +++ b/regressions/test-remote.sh @@ -26,7 +26,7 @@ eval `../fish/guestfish --listen` ../fish/guestfish --remote alloc test.img 10M ../fish/guestfish --remote run -../fish/guestfish --remote sfdiskM /dev/sda , +../fish/guestfish --remote part-disk /dev/sda mbr ../fish/guestfish --remote mkfs ext2 /dev/sda1 ../fish/guestfish --remote mount /dev/sda1 / |