]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
imsm: make messages more understandable
authorLukasz Dorau <lukasz.dorau@intel.com>
Fri, 16 Dec 2011 13:04:53 +0000 (14:04 +0100)
committerNeilBrown <neilb@suse.de>
Mon, 19 Dec 2011 23:37:01 +0000 (10:37 +1100)
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.

Acked-by: Dan Williams <dan.j.williams@intel.com>
Acked-by: Marcin Labun <marcin.labun@intel.com>
Signed-off-by: Lukasz Dorau <lukasz.dorau@intel.com>
Signed-off-by: NeilBrown <neilb@suse.de>
super-intel.c

index 0e77537940cbbaff094932a7623d7e744ebd689a..0e9269f5deea81b161569cc3395f30608bdb4e81 100644 (file)
@@ -5445,9 +5445,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;
        }