Refuse an invalid --resize value in vitastor-cli modify #98
Reference in New Issue
Block a user
No description provided.
Delete Branch "koolkhel/vitastor:cli-modify-resize"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Description
parse_size() returns 0 for a value it cannot parse, such as 1.5G, and
modify took 0 as "no resize": it printed "No change" and exited with 0.
Check the parse result and fail with EINVAL, as create does for --size.
Numeric sizes passed by internal callers (NFS, dd) parse as before.
Tested: new tests/test_modify_image_resize.sh (
--resize 1.5G,10X,abc, empty), fails without the fix and passes with it.Contributor Name
Yury Luneff (MIND Software LLC, https://mindsw.io)
CLA