Skip to content
Commit 8607717b authored by Mike Fleetwood's avatar Mike Fleetwood Committed by Curtis Gedak
Browse files

Make "loop" table appear as unknown whole device file system (#743181)

Previously GParted displayed a device containing the parted "loop"
partition table signature "GNU Parted Loopback 0" and nothing else, as
an unrecognised device.

Now make GParted display this as a virtual whole disk device partition
with unknown contents, complete with the unable to detect a file system
warning.  This change then allows a whole disk device file system to be
created with the following two steps:
1) Create "loop" partition table on a device;
2) Format to required file system.

GParted represents a whole disk device file system as:

    mydevice.max_prims = 1
    mydevice.disktype  = "none"
    mydevice.partitions[0].type         = TYPE_PRIMARY
    mydevice.partitions[0].whole_device = true
    mydevice.partitions[0].filesystem   = FS_EXT4  (example)

Now represents just Parted's "loop" signature as:

    mydevice.max_prims = 1
    mydevice.disktype  = "loop"
    mydevice.partitions[0].type         = TYPE_PRIMARY
    mydevice.partitions[0].whole_device = true
    mydevice.partitions[0].filesystem   = FS_UNKNOWN

And as before, an unpartitioned device as:

    mydevice.max_prims = -1
    mydevice.disktype  = _("unrecognized")
    mydevice.partitions[0].type         = TYPE_UNALLOCATED
    mydevice.partitions[0].whole_device = true
    mydevice.partitions[0].filesystem   = FS_UNALLOCATED

Bug 743181 - Add unpartitioned drive read-write support
parent c01106c5
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment