|
|
|
@ -372,3 +372,31 @@ isEfiBootable( const Partition* candidate )
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
} // nmamespace PartUtils
|
|
|
|
|
|
|
|
|
|
/* Implementation of methods for FstabEntry, from OsproberEntry.h */
|
|
|
|
|
|
|
|
|
|
bool
|
|
|
|
|
FstabEntry::isValid() const
|
|
|
|
|
{
|
|
|
|
|
return !partitionNode.isEmpty() && !mountPoint.isEmpty() && !fsType.isEmpty();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
FstabEntry
|
|
|
|
|
FstabEntry::fromEtcFstab( const QString& rawLine )
|
|
|
|
|
{
|
|
|
|
|
QString line = rawLine.simplified();
|
|
|
|
|
if ( line.startsWith( '#' ) )
|
|
|
|
|
return FstabEntry{ QString(), QString(), QString(), QString(), 0, 0 };
|
|
|
|
|
|
|
|
|
|
QStringList splitLine = line.split( ' ' );
|
|
|
|
|
if ( splitLine.length() != 6 )
|
|
|
|
|
return FstabEntry{ QString(), QString(), QString(), QString(), 0, 0 };
|
|
|
|
|
|
|
|
|
|
return FstabEntry{ splitLine.at( 0 ), // path, or UUID, or LABEL, etc.
|
|
|
|
|
splitLine.at( 1 ), // mount point
|
|
|
|
|
splitLine.at( 2 ), // fs type
|
|
|
|
|
splitLine.at( 3 ), // options
|
|
|
|
|
splitLine.at( 4 ).toInt(), //dump
|
|
|
|
|
splitLine.at( 5 ).toInt() //pass
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|