From 4257021857175f5496e6743f83132558cdd4d9b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrius=20=C5=A0tikonas?= Date: Sat, 16 Sep 2017 19:09:03 +0100 Subject: [PATCH] Use QStringList to store fstab options. --- src/core/fstab.cpp | 2 +- src/core/fstab.h | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/core/fstab.cpp b/src/core/fstab.cpp index 14f0043..f44f142 100644 --- a/src/core/fstab.cpp +++ b/src/core/fstab.cpp @@ -47,11 +47,11 @@ FstabEntry::FstabEntry(const QString& fsSpec, const QString& mountPoint, const Q : m_fsSpec(fsSpec) , m_mountPoint(mountPoint) , m_type(type) - , m_options(options) , m_dumpFreq(dumpFreq) , m_passNumber(passNumber) , m_comment(comment) { + m_options = options.split(QLatin1Char(',')); m_entryType = FstabEntryType::comment; if (fsSpec.startsWith(QStringLiteral("UUID="))) { m_entryType = FstabEntryType::uuid; diff --git a/src/core/fstab.h b/src/core/fstab.h index dcf19e0..df365ee 100644 --- a/src/core/fstab.h +++ b/src/core/fstab.h @@ -49,7 +49,7 @@ public: const QString& type() const { return m_type; /**< @return the type of the file system */ } - const QString& options() const { + const QStringList& options() const { return m_options; /**< @return the mount options associated with the file system */ } int dumpFreq() const { @@ -70,7 +70,7 @@ private: QString m_deviceNode; QString m_mountPoint; QString m_type; - QString m_options; + QStringList m_options; int m_dumpFreq; int m_passNumber; QString m_comment; @@ -79,7 +79,7 @@ private: typedef QList FstabEntryList; -FstabEntryList readFstabEntries(const QString& fstabPath = QStringLiteral("/etc/fstab")); -QStringList possibleMountPoints(const QString& deviceNode, const QString& fstabPath = QStringLiteral("/etc/fstab")); +LIBKPMCORE_EXPORT FstabEntryList readFstabEntries(const QString& fstabPath = QStringLiteral("/etc/fstab")); +LIBKPMCORE_EXPORT QStringList possibleMountPoints(const QString& deviceNode, const QString& fstabPath = QStringLiteral("/etc/fstab")); #endif