mirror of
https://github.com/kdave/btrfs-progs
synced 2025-02-16 17:56:51 +00:00
btrfs-progs: resize: return error value from check_resize_args()
check_resize_args() function checks user argument amount but does not return the correct value in case it's not valid. Signed-off-by: Sidong Yang <realwakka@gmail.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
f0c2bb0057
commit
55438f3930
@ -1122,6 +1122,7 @@ static int check_resize_args(const char *amount, const char *path) {
|
||||
ret = 1;
|
||||
goto out;
|
||||
}
|
||||
ret = 0;
|
||||
|
||||
sizestr = amount_dup;
|
||||
devstr = strchr(sizestr, ':');
|
||||
@ -1208,7 +1209,7 @@ static int check_resize_args(const char *amount, const char *path) {
|
||||
|
||||
out:
|
||||
free(di_args);
|
||||
return 0;
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int cmd_filesystem_resize(const struct cmd_struct *cmd,
|
||||
|
Loading…
Reference in New Issue
Block a user