Loopback devices names are always like /dev/loopN and for those the partition names are always defined with the addition of pN, so following the partition naming convention of the source devices led to wrong results when it was different from /dev/mmcblk0
The case switch routine for source device partition names had the asterisk inside the quotes, and that's why it always resulted in "p" (by the default definition), with asterisk outside quotes it works as intended.
Loopback devices names are always like
/dev/loopN
and for those the partition names are always defined with the addition ofpN
, so following the partition naming convention of the source devices led to wrong results when it was different from/dev/mmcblk0
The case switch routine for source device partition names had the asterisk inside the quotes, and that's why it always resulted in "p" (by the default definition), with asterisk outside quotes it works as intended.