Re: [PATCH] imsm: make messages more understandable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 16 Dec 2011 15:04:53 +0100 Lukasz Dorau <lukasz.dorau@xxxxxxxxx>
wrote:

> The printed messages should be more appropriate and understandable
> for user. If maxsize is equal 0, this means there is no free space left
> on device. If size is greater than maxsize, this means there is not enough
> space to create a new volume of given size.
> 
> Signed-off-by: Lukasz Dorau <lukasz.dorau@xxxxxxxxx>
> ---
>  super-intel.c |   13 ++++++++++---
>  1 files changed, 10 insertions(+), 3 deletions(-)
> 
> diff --git a/super-intel.c b/super-intel.c
> index 3c10d29..3990d58 100644
> --- a/super-intel.c
> +++ b/super-intel.c
> @@ -5466,9 +5466,16 @@ static int validate_geometry_imsm_volume(struct supertype *st, int level,
>  	}
>  
>  	if (maxsize < size || maxsize == 0) {
> -		if (verbose)
> -			fprintf(stderr, Name ": not enough space after merge (%llu < %llu)\n",
> -				maxsize, size);
> +		if (verbose) {
> +			if (maxsize == 0)
> +				fprintf(stderr, Name ": no free space"
> +						" left on device. Aborting...\n");
> +			else
> +				fprintf(stderr, Name ": not enough space"
> +						" to create volume of given size"
> +						" (%llu < %llu). Aborting...\n",
> +						maxsize, size);
> +		}
>  		return 0;
>  	}

Applied.  Thanks.

NeilBrown

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux