mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-14 20:30:04 +01:00
Device size parameter must be always aligned to 512.
This commit is contained in:
committed by
Milan Broz
parent
c2b2b1ab5c
commit
ecb898c7ff
@@ -3819,6 +3819,10 @@ int main(int argc, const char **argv)
|
||||
usage(popt_context, EXIT_FAILURE, _("LUKS2 decryption requires option --header."),
|
||||
poptGetInvocationName(popt_context));
|
||||
|
||||
if (opt_device_size % SECTOR_SIZE)
|
||||
usage(popt_context, EXIT_FAILURE, _("Device size must be multiple of 512 bytes sector."),
|
||||
poptGetInvocationName(popt_context));
|
||||
|
||||
if (opt_data_shift && opt_device_size)
|
||||
usage(popt_context, EXIT_FAILURE, _("Options --reduce-device-size and --data-size cannot be combined."),
|
||||
poptGetInvocationName(popt_context));
|
||||
|
||||
Reference in New Issue
Block a user