[parted-devel] [PATCH] Add an error message for dasd.

Jim Meyering jim at meyering.net
Thu Feb 19 17:28:05 UTC 2009


Joel Granados Moreno <jgranado at redhat.com> writes:
> * libparted/labels/dasd.c (dasd_probe) : Inform the user when no dasd
> volumes are present in a device.

Although this is an obvious improvement, it'd be even better
if (you guessed it!) you were to include a reproducer
to demonstrate the old/new behavior.
Can you?

>  libparted/labels/dasd.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/libparted/labels/dasd.c b/libparted/labels/dasd.c
> index 9edab40..dfdd59c 100644
> --- a/libparted/labels/dasd.c
> +++ b/libparted/labels/dasd.c
> @@ -213,7 +213,6 @@ ped_disk_dasd_done ()
>  static int
>  dasd_probe (const PedDevice *dev)
>  {
> -	char *errstr = 0;
>  	LinuxSpecific* arch_specific;
>  	struct fdasd_anchor anchor;
>
> @@ -240,7 +239,8 @@ dasd_probe (const PedDevice *dev)
>
>  error_cleanup:
>  	fdasd_cleanup(&anchor);
> -	ped_exception_throw(PED_EXCEPTION_ERROR,PED_EXCEPTION_IGNORE_CANCEL,errstr);
> +	ped_exception_throw(PED_EXCEPTION_ERROR,PED_EXCEPTION_IGNORE_CANCEL,
> +			"Error while probing device %s.", dev->name);
>
>  	return 0;
>  }



More information about the parted-devel mailing list