mirror of
https://github.com/cmclark00/retro-imager.git
synced 2025-05-18 16:05:21 +01:00
Linux (as root): FAT32 format: wait for FAT partition after sfdisk
The FAT partition /dev node is supposed to be already available after running partprobe, but since there is a user report that is not always the case, double check and delay if necessary. Closes #237
This commit is contained in:
parent
08b7398e6b
commit
2e5cc7508a
1 changed files with 12 additions and 0 deletions
|
@ -187,6 +187,18 @@ void DriveFormatThread::run()
|
||||||
}
|
}
|
||||||
|
|
||||||
proc.execute("partprobe", QStringList() );
|
proc.execute("partprobe", QStringList() );
|
||||||
|
for (int tries = 0; tries < 30; tries++)
|
||||||
|
{
|
||||||
|
if (QFile::exists(fatpartition))
|
||||||
|
break;
|
||||||
|
|
||||||
|
QThread::msleep(100);
|
||||||
|
}
|
||||||
|
if (!QFile::exists(fatpartition))
|
||||||
|
{
|
||||||
|
emit error(tr("Partitioning did not create expected FAT partition %1").arg(QString(fatpartition)));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
args.clear();
|
args.clear();
|
||||||
args << fatpartition;
|
args << fatpartition;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue