Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
actions/image-partition: check label length in verify stage
The partition name (label) can be up to 11 characters long for vfat and 16 characters long for ext3/4. When partition label length is longer than 11 characters for vfat, it fails with below message, ==== image-partition ==== 2021/07/23 06:14:35 cmdline: [mkfs.vfat -F32 -n efi456789012 /dev/vda1] 2021/07/23 06:14:35 Formatting partition 1 | mkfs.vfat: Label can be no longer than 11 characters 2021/07/23 06:14:35 Formatting partition 1 | mkfs.fat 4.2 (2021-01-31) 2021/07/23 06:14:35 Action `image-partition` failed at stage Run, error: exit status 1 When partition label length is longer than 11 characters for ext3/4, it shows the below warning message, 2021/07/23 06:05:49 cmdline: [mkfs.ext4 -L root567890123456789 /dev/vda2] 2021/07/23 06:05:49 Formatting partition 2 | Warning: label too long; will be truncated to 'root567890123456' This commit checks the label length for all partition types in verify action and exits if it is longer than the above values. Signed-off-by: Vignesh Raman <[email protected]>
- Loading branch information