mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
fdasd: Skip partition check with the force option
Before writing data to the disk, fdasd always checks whether a partition is specified to prevent writing partition tables to a partition. However, this also prevents the user from writing partition tables to loop devices > loop0, even when the force option is specified. Technically, those are not partitions. Therefore, allow writing partition tables to partitions when the force option is specified. Fixes: #4 Reviewed-by: Stefan Haberland <sth@linux.vnet.ibm.com> Signed-off-by: Jan Höppner <hoeppner@linux.vnet.ibm.com> Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
This commit is contained in:
committed by
Michael Holzheu
parent
c2cb410b8f
commit
cd085dc721
@@ -921,7 +921,7 @@ static void fdasd_verify_device(fdasd_anchor_t *anc, char *name)
|
||||
fdasd_error(anc, device_verification_failed, err_str);
|
||||
}
|
||||
|
||||
if (minor(dst.st_rdev) & PARTN_MASK) {
|
||||
if (!anc->force_virtual && minor(dst.st_rdev) & PARTN_MASK) {
|
||||
snprintf(err_str, ERROR_STRING_SIZE,
|
||||
"Partition '%s' (%d/%d) detected where device is "
|
||||
"required\n", name,
|
||||
|
||||
Reference in New Issue
Block a user