mirror of
https://github.com/parchlinux/calamares.git
synced 2025-02-24 19:05:46 -05:00
[partition] winnow floppy drives
- don't list floppy drives FIXES #1393
This commit is contained in:
parent
a78c368367
commit
948c078e1a
1 changed files with 19 additions and 1 deletions
|
@ -92,6 +92,19 @@ isIso9660( const Device* device )
|
|||
return false;
|
||||
}
|
||||
|
||||
static inline bool
|
||||
isZRam( const Device* device )
|
||||
{
|
||||
const QString path = device->deviceNode();
|
||||
return path.startswith( "/dev/zram" );
|
||||
}
|
||||
|
||||
static inline bool
|
||||
isFloppyDrive( const Device* device )
|
||||
{
|
||||
const QString path = device->deviceNode();
|
||||
return path.startswith( "/dev/fd" ) || path.startswith( "/dev/floppy" );
|
||||
}
|
||||
|
||||
static inline QDebug&
|
||||
operator<<( QDebug& s, QList< Device* >::iterator& it )
|
||||
|
@ -138,11 +151,16 @@ getDevices( DeviceType which, qint64 minimumSize )
|
|||
cDebug() << Logger::SubEntry << "Skipping nullptr device";
|
||||
it = erase( devices, it );
|
||||
}
|
||||
else if ( ( *it )->deviceNode().startsWith( "/dev/zram" ) )
|
||||
else if ( isZRam( *it ) )
|
||||
{
|
||||
cDebug() << Logger::SubEntry << "Removing zram" << it;
|
||||
it = erase( devices, it );
|
||||
}
|
||||
else if ( isFloppyDrive( ( *it ) ) )
|
||||
{
|
||||
cDebug() << Logger::SubEntry << "Removing floppy disk" << it;
|
||||
it = erase( devices, it );
|
||||
}
|
||||
else if ( writableOnly && hasRootPartition( *it ) )
|
||||
{
|
||||
cDebug() << Logger::SubEntry << "Removing device with root filesystem (/) on it" << it;
|
||||
|
|
Loading…
Add table
Reference in a new issue