Skip to content

Commit

Permalink
Merge pull request #17 from SUSE/fix_s390_fcp_resize
Browse files Browse the repository at this point in the history
Fixed resize of dos table type on s390
  • Loading branch information
schaefi authored Sep 3, 2024
2 parents 1a45f20 + bc36a61 commit 6799a2c
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion dracut/modules.d/99kiwi-lib/kiwi-partitions-lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -290,11 +290,22 @@ function get_free_disk_bytes {

function get_partition_table_type {
local disk_device="$1"
local table_type

# blkid doesn't work for dasd partitions, so on s390 parted is used
# to detect the partition type (bsc#1209247)
if [[ "$(uname -m)" =~ s390 ]];then
parted --script --machine "${disk_device}" print | grep "^${disk_device}" | cut -d":" -f6
table_type=$(
parted --script --machine "${disk_device}" print |\
grep "^${disk_device}" | cut -d":" -f6
)
if [ "${table_type}" = "msdos" ];then
# make sure to set a consistent table name for the
# DOS table type. In the initrd code we use 'dos'
# as identifier but parted reports msdos
table_type="dos"
fi
echo "${table_type}"
else
blkid -s PTTYPE -o value "$disk_device"
fi
Expand Down

0 comments on commit 6799a2c

Please sign in to comment.