2020-08-25 16:05:56 +02:00
|
|
|
/* === This file is part of Calamares - <https://calamares.io> ===
|
2014-09-23 17:42:11 +02:00
|
|
|
*
|
2020-08-22 01:19:58 +02:00
|
|
|
* SPDX-FileCopyrightText: 2014-2016 Teo Mrnjavac <teo@kde.org>
|
|
|
|
* SPDX-FileCopyrightText: 2018 Adriaan de Groot <groot@kde.org>
|
|
|
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
2014-09-23 17:42:11 +02:00
|
|
|
*
|
2020-08-25 16:05:56 +02:00
|
|
|
* Calamares is Free Software: see the License-Identifier above.
|
2014-09-23 17:42:11 +02:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef OSPROBERENTRY_H
|
|
|
|
#define OSPROBERENTRY_H
|
|
|
|
|
|
|
|
#include <QStringList>
|
|
|
|
|
2016-07-08 16:56:53 +02:00
|
|
|
struct FstabEntry
|
|
|
|
{
|
|
|
|
QString partitionNode;
|
|
|
|
QString mountPoint;
|
|
|
|
QString fsType;
|
|
|
|
QString options;
|
|
|
|
int dump;
|
|
|
|
int pass;
|
2018-11-02 16:57:49 +01:00
|
|
|
|
|
|
|
/// Does this entry make sense and is it complete?
|
2020-02-14 11:15:57 +01:00
|
|
|
bool isValid() const; // implemented in Partutils.cpp
|
2018-11-02 16:57:49 +01:00
|
|
|
|
|
|
|
/** @brief Create an entry from a live of /etc/fstab
|
|
|
|
*
|
|
|
|
* Splits the given string (which ought to follow the format
|
|
|
|
* of /etc/fstab) and returns a corresponding Fstab entry.
|
|
|
|
* If the string isn't valid (e.g. comment-line, or broken
|
|
|
|
* fstab entry) then the entry that is returned is invalid.
|
|
|
|
*/
|
2020-02-14 11:15:57 +01:00
|
|
|
static FstabEntry fromEtcFstab( const QString& ); // implemented in Partutils.cpp
|
2016-07-08 16:56:53 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
typedef QList< FstabEntry > FstabEntryList;
|
|
|
|
|
2014-09-23 17:42:11 +02:00
|
|
|
struct OsproberEntry
|
|
|
|
{
|
|
|
|
QString prettyName;
|
|
|
|
QString path;
|
2020-05-15 23:03:51 +02:00
|
|
|
QString file;
|
2016-07-28 17:40:13 +02:00
|
|
|
QString uuid;
|
2014-09-23 17:42:11 +02:00
|
|
|
bool canBeResized;
|
|
|
|
QStringList line;
|
2016-07-08 16:56:53 +02:00
|
|
|
FstabEntryList fstab;
|
2016-07-13 17:30:06 +02:00
|
|
|
QString homePath;
|
2014-09-23 17:42:11 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
typedef QList< OsproberEntry > OsproberEntryList;
|
|
|
|
|
2020-02-14 11:15:57 +01:00
|
|
|
#endif // OSPROBERENTRY_H
|