Commit 5ffc5c6f authored by Andrius Štikonas's avatar Andrius Štikonas
Browse files

Fix davfs entries being omitted from fstab file.

BUG: 447961
parent e58ab02b
Pipeline #119169 passed with stage
in 52 seconds
......@@ -240,7 +240,8 @@ static QString findBlkIdDevice(const char *token, const QString& value)
static void parseFsSpec(const QString& m_fsSpec, FstabEntry::Type& m_entryType, QString& m_deviceNode)
{
m_entryType = FstabEntry::Type::comment;
m_entryType = FstabEntry::Type::other;
m_deviceNode = m_fsSpec;
if (m_fsSpec.startsWith(QStringLiteral("UUID="))) {
m_entryType = FstabEntry::Type::uuid;
m_deviceNode = findBlkIdDevice("UUID", QString(m_fsSpec).remove(QStringLiteral("UUID=")));
......@@ -255,7 +256,8 @@ static void parseFsSpec(const QString& m_fsSpec, FstabEntry::Type& m_entryType,
m_deviceNode = findBlkIdDevice("PARTLABEL", QString(m_fsSpec).remove(QStringLiteral("PARTLABEL=")));
} else if (m_fsSpec.startsWith(QStringLiteral("/"))) {
m_entryType = FstabEntry::Type::deviceNode;
m_deviceNode = m_fsSpec;
} else if (m_fsSpec.isEmpty()) {
m_entryType = FstabEntry::Type::comment;
}
}
......
......@@ -26,7 +26,7 @@ struct FstabEntryPrivate;
class LIBKPMCORE_EXPORT FstabEntry
{
public:
enum class Type { deviceNode, uuid, label, partlabel, partuuid, comment };
enum class Type { deviceNode, uuid, label, partlabel, partuuid, comment, other };
FstabEntry(const QString& fsSpec, const QString& mountPoint, const QString& type, const QString& options, int dumpFreq = 0, int passNumber = 0, const QString& comment = QString());
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment