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

[linux-lvm] [PATCH 27/35] fsadm: error out when no size is provided in resize



Signed-off-by: Lukas Czerner <lczerner redhat com>
---
 scripts/fsadm.sh |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/scripts/fsadm.sh b/scripts/fsadm.sh
index ba78533..e11f7f9 100755
--- a/scripts/fsadm.sh
+++ b/scripts/fsadm.sh
@@ -602,6 +602,10 @@ resize() {
 		esac
 	done
 
+	if [ $size -eq 0 ]; then
+		error "Please provide the size argument. (see: $TOOL --help )"
+	fi
+
 	[ -z $lvname ] && error "Logical volume to resize was not specified"
 	[ $devcount -gt 0 ] && [ "$shrink" ] && warn "While shrinking the file system we "\
 						     "do not need additional devices. "\
@@ -630,11 +634,6 @@ resize() {
 		fi
 	fi
 
-	# If no size parameter has been provided, resize the volume to the maximum
-	if [ $size -eq 0 ]; then
-		echo "What??"
-	fi
-
 	# determine new size of the file system
 	if [ "$extend" ] || [ "$shrink" ] || [ "$new_size" ]; then
 		# only one of those variable should be set, so it is safe to do that
-- 
1.7.4.4


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