Petr Uzel wrote:
> 'parted print $dev' does not give any useful information for a device without 
> a
> disk label, even the informations which are not dependent on the label
> (geometry, size, sector size etc.). This is an attempt to make 'parted print'
> more useful with an empty disk.
>
> This series is based on feedback I got for the first 'always print geometry'
> patches:
>
> http://www.mail-archive.com/[email protected]/msg03022.html
>
>
> Before:
>
> modprobe scsi_debug
> ./parted -s /dev/sdd print
>    Error: /dev/sdd: unrecognised disk label
>
> After:
>
> ./parted -s /dev/sdd print
>   Error: /dev/sdd: unrecognised disk label
>   Model: Linux scsi_debug (scsi)
>   Disk /dev/sdd: 8389kB
>   Sector size (logical/physical): 512B/512B
>   Partition Table: unknown

Thank you!
That is a welcome change.
Thanks especially for including a test suite addition
and the NEWS entry.

I've made some minor changes to a log entry
(I much prefer "partition table" to "disk label")
and removed a trailing space in NEWS.

> I would like to suppress the 'Error: /dev/sdX: unrecognised disk label" in the
> output, but I don't know how to achieve that. I know I could catch the
> exceptions (ped_exception_fetch_all()) from ped_disk_new(), but this in turn
> disables some other error messages from ped_disk_new(), that should not be
> suppressed, e.g. the 'Error: The primary GPT table is corrupt, but the backup
> appears OK'. Any idea how to suppress this particular error message only when
> called from do_print?

I haven't looked at that yet, but that's no reason to hold up
the addition, so I've pushed these three change sets.

_______________________________________________
parted-devel mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/parted-devel

Reply via email to