From 44af166f8310b79bb7ad840c3b2646c8e79927be Mon Sep 17 00:00:00 2001 From: Volker Lanz Date: Wed, 27 Jan 2010 13:00:14 +0000 Subject: [PATCH] rename all values in CommandSupportType to make them more unique svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1081018 --- src/core/libparted.cpp | 8 ++--- src/fs/ext2.cpp | 48 +++++++++++++++--------------- src/fs/extended.cpp | 8 ++--- src/fs/fat16.cpp | 46 ++++++++++++++-------------- src/fs/filesystem.h | 41 +++++++++++++++---------- src/fs/hfs.cpp | 30 +++++++++---------- src/fs/hfsplus.cpp | 24 +++++++-------- src/fs/jfs.cpp | 32 ++++++++++---------- src/fs/linuxswap.cpp | 26 ++++++++-------- src/fs/ntfs.cpp | 42 +++++++++++++------------- src/fs/reiser4.cpp | 26 ++++++++-------- src/fs/reiserfs.cpp | 46 ++++++++++++++-------------- src/fs/ufs.cpp | 6 ++-- src/fs/unformatted.cpp | 2 +- src/fs/xfs.cpp | 34 ++++++++++----------- src/gui/newdialog.cpp | 4 +-- src/gui/partpropsdialog.cpp | 8 ++--- src/jobs/backupfilesystemjob.cpp | 4 +-- src/jobs/checkfilesystemjob.cpp | 2 +- src/jobs/copyfilesystemjob.cpp | 6 ++-- src/jobs/createfilesystemjob.cpp | 2 +- src/jobs/resizefilesystemjob.cpp | 4 +-- src/jobs/setfilesystemlabeljob.cpp | 4 +-- src/ops/backupoperation.cpp | 2 +- src/ops/checkoperation.cpp | 2 +- src/ops/copyoperation.cpp | 2 +- src/ops/resizeoperation.cpp | 6 ++-- 27 files changed, 238 insertions(+), 227 deletions(-) diff --git a/src/core/libparted.cpp b/src/core/libparted.cpp index 0bcfd97..f60bc9e 100644 --- a/src/core/libparted.cpp +++ b/src/core/libparted.cpp @@ -108,9 +108,9 @@ static void readSectorsUsed(PedDisk* pedDisk, Partition& p, const QString& mount if (freeSpaceInfo.isValid()) p.fileSystem().setSectorsUsed(freeSpaceInfo.used() / p.sectorSize()); - else if (p.fileSystem().supportGetUsed() == FileSystem::SupportExternal) + else if (p.fileSystem().supportGetUsed() == FileSystem::cmdSupportFileSystem) p.fileSystem().setSectorsUsed(p.fileSystem().readUsedCapacity(p.deviceNode()) / p.sectorSize()); - else if (p.fileSystem().supportGetUsed() == FileSystem::SupportInternal) + else if (p.fileSystem().supportGetUsed() == FileSystem::cmdSupportCore) p.fileSystem().setSectorsUsed(readSectorsUsedLibParted(pedDisk, p)); } @@ -181,10 +181,10 @@ static void scanDevicePartitions(PedDevice* pedDevice, Device& d, PedDisk* pedDi readSectorsUsed(pedDisk, *part, mountPoint); - if (fs->supportGetLabel() != FileSystem::SupportNone) + if (fs->supportGetLabel() != FileSystem::cmdSupportNone) fs->setLabel(fs->readLabel(part->deviceNode())); - if (fs->supportGetUUID() != FileSystem::SupportNone) + if (fs->supportGetUUID() != FileSystem::cmdSupportNone) fs->setUUID(fs->readUUID(part->deviceNode())); parent->append(part); diff --git a/src/fs/ext2.cpp b/src/fs/ext2.cpp index 5089009..f92f4aa 100644 --- a/src/fs/ext2.cpp +++ b/src/fs/ext2.cpp @@ -27,18 +27,18 @@ namespace FS { - FileSystem::CommandSupportType ext2::m_GetUsed = FileSystem::SupportNone; - FileSystem::CommandSupportType ext2::m_GetLabel = FileSystem::SupportNone; - FileSystem::CommandSupportType ext2::m_Create = FileSystem::SupportNone; - FileSystem::CommandSupportType ext2::m_Grow = FileSystem::SupportNone; - FileSystem::CommandSupportType ext2::m_Shrink = FileSystem::SupportNone; - FileSystem::CommandSupportType ext2::m_Move = FileSystem::SupportNone; - FileSystem::CommandSupportType ext2::m_Check = FileSystem::SupportNone; - FileSystem::CommandSupportType ext2::m_Copy = FileSystem::SupportNone; - FileSystem::CommandSupportType ext2::m_Backup = FileSystem::SupportNone; - FileSystem::CommandSupportType ext2::m_SetLabel = FileSystem::SupportNone; - FileSystem::CommandSupportType ext2::m_UpdateUUID = FileSystem::SupportNone; - FileSystem::CommandSupportType ext2::m_GetUUID = FileSystem::SupportNone; + FileSystem::CommandSupportType ext2::m_GetUsed = FileSystem::cmdSupportNone; + FileSystem::CommandSupportType ext2::m_GetLabel = FileSystem::cmdSupportNone; + FileSystem::CommandSupportType ext2::m_Create = FileSystem::cmdSupportNone; + FileSystem::CommandSupportType ext2::m_Grow = FileSystem::cmdSupportNone; + FileSystem::CommandSupportType ext2::m_Shrink = FileSystem::cmdSupportNone; + FileSystem::CommandSupportType ext2::m_Move = FileSystem::cmdSupportNone; + FileSystem::CommandSupportType ext2::m_Check = FileSystem::cmdSupportNone; + FileSystem::CommandSupportType ext2::m_Copy = FileSystem::cmdSupportNone; + FileSystem::CommandSupportType ext2::m_Backup = FileSystem::cmdSupportNone; + FileSystem::CommandSupportType ext2::m_SetLabel = FileSystem::cmdSupportNone; + FileSystem::CommandSupportType ext2::m_UpdateUUID = FileSystem::cmdSupportNone; + FileSystem::CommandSupportType ext2::m_GetUUID = FileSystem::cmdSupportNone; ext2::ext2(qint64 firstsector, qint64 lastsector, qint64 sectorsused, const QString& label, FileSystem::Type t) : FileSystem(firstsector, lastsector, sectorsused, label, t) @@ -47,18 +47,18 @@ namespace FS void ext2::init() { - m_GetUsed = findExternal("dumpe2fs") ? SupportExternal : SupportNone; - m_GetLabel = SupportInternal; - m_SetLabel = findExternal("e2label") ? SupportExternal : SupportNone; - m_Create = findExternal("mkfs.ext2") ? SupportExternal : SupportNone; - m_Check = findExternal("e2fsck", QStringList() << "-V") ? SupportExternal : SupportNone; - m_UpdateUUID = findExternal("tune2fs") ? SupportExternal : SupportNone; - m_Grow = (m_Check != SupportNone && findExternal("resize2fs")) ? SupportExternal : SupportNone; - m_Shrink = m_GetUsed != SupportNone ? SupportExternal : SupportNone; - m_Copy = (m_Check != SupportNone) ? SupportInternal : SupportNone; - m_Move = (m_Check != SupportNone) ? SupportInternal : SupportNone; - m_Backup = SupportInternal; - m_GetUUID = SupportInternal; + m_GetUsed = findExternal("dumpe2fs") ? cmdSupportFileSystem : cmdSupportNone; + m_GetLabel = cmdSupportCore; + m_SetLabel = findExternal("e2label") ? cmdSupportFileSystem : cmdSupportNone; + m_Create = findExternal("mkfs.ext2") ? cmdSupportFileSystem : cmdSupportNone; + m_Check = findExternal("e2fsck", QStringList() << "-V") ? cmdSupportFileSystem : cmdSupportNone; + m_UpdateUUID = findExternal("tune2fs") ? cmdSupportFileSystem : cmdSupportNone; + m_Grow = (m_Check != cmdSupportNone && findExternal("resize2fs")) ? cmdSupportFileSystem : cmdSupportNone; + m_Shrink = m_GetUsed != cmdSupportNone ? cmdSupportFileSystem : cmdSupportNone; + m_Copy = (m_Check != cmdSupportNone) ? cmdSupportCore : cmdSupportNone; + m_Move = (m_Check != cmdSupportNone) ? cmdSupportCore : cmdSupportNone; + m_Backup = cmdSupportCore; + m_GetUUID = cmdSupportCore; } qint64 ext2::maxCapacity() const diff --git a/src/fs/extended.cpp b/src/fs/extended.cpp index bf35157..cfd5568 100644 --- a/src/fs/extended.cpp +++ b/src/fs/extended.cpp @@ -21,10 +21,10 @@ namespace FS { - FileSystem::CommandSupportType extended::m_Create = FileSystem::SupportExternal; - FileSystem::CommandSupportType extended::m_Grow = FileSystem::SupportInternal; - FileSystem::CommandSupportType extended::m_Shrink = FileSystem::SupportInternal; - FileSystem::CommandSupportType extended::m_Move = FileSystem::SupportInternal; + FileSystem::CommandSupportType extended::m_Create = FileSystem::cmdSupportFileSystem; + FileSystem::CommandSupportType extended::m_Grow = FileSystem::cmdSupportCore; + FileSystem::CommandSupportType extended::m_Shrink = FileSystem::cmdSupportCore; + FileSystem::CommandSupportType extended::m_Move = FileSystem::cmdSupportCore; extended::extended(qint64 firstsector, qint64 lastsector, qint64 sectorsused, const QString& label) : FileSystem(firstsector, lastsector, sectorsused, label, FileSystem::Extended) diff --git a/src/fs/fat16.cpp b/src/fs/fat16.cpp index 454add8..46d28b4 100644 --- a/src/fs/fat16.cpp +++ b/src/fs/fat16.cpp @@ -36,18 +36,18 @@ namespace FS { - FileSystem::CommandSupportType fat16::m_GetUsed = FileSystem::SupportNone; - FileSystem::CommandSupportType fat16::m_GetLabel = FileSystem::SupportNone; - FileSystem::CommandSupportType fat16::m_SetLabel = FileSystem::SupportNone; - FileSystem::CommandSupportType fat16::m_Create = FileSystem::SupportNone; - FileSystem::CommandSupportType fat16::m_Grow = FileSystem::SupportNone; - FileSystem::CommandSupportType fat16::m_Shrink = FileSystem::SupportNone; - FileSystem::CommandSupportType fat16::m_Move = FileSystem::SupportNone; - FileSystem::CommandSupportType fat16::m_Check = FileSystem::SupportNone; - FileSystem::CommandSupportType fat16::m_Copy = FileSystem::SupportNone; - FileSystem::CommandSupportType fat16::m_Backup = FileSystem::SupportNone; - FileSystem::CommandSupportType fat16::m_UpdateUUID = FileSystem::SupportNone; - FileSystem::CommandSupportType fat16::m_GetUUID = FileSystem::SupportNone; + FileSystem::CommandSupportType fat16::m_GetUsed = FileSystem::cmdSupportNone; + FileSystem::CommandSupportType fat16::m_GetLabel = FileSystem::cmdSupportNone; + FileSystem::CommandSupportType fat16::m_SetLabel = FileSystem::cmdSupportNone; + FileSystem::CommandSupportType fat16::m_Create = FileSystem::cmdSupportNone; + FileSystem::CommandSupportType fat16::m_Grow = FileSystem::cmdSupportNone; + FileSystem::CommandSupportType fat16::m_Shrink = FileSystem::cmdSupportNone; + FileSystem::CommandSupportType fat16::m_Move = FileSystem::cmdSupportNone; + FileSystem::CommandSupportType fat16::m_Check = FileSystem::cmdSupportNone; + FileSystem::CommandSupportType fat16::m_Copy = FileSystem::cmdSupportNone; + FileSystem::CommandSupportType fat16::m_Backup = FileSystem::cmdSupportNone; + FileSystem::CommandSupportType fat16::m_UpdateUUID = FileSystem::cmdSupportNone; + FileSystem::CommandSupportType fat16::m_GetUUID = FileSystem::cmdSupportNone; fat16::fat16(qint64 firstsector, qint64 lastsector, qint64 sectorsused, const QString& label, FileSystem::Type t) : FileSystem(firstsector, lastsector, sectorsused, label, t) @@ -56,17 +56,17 @@ namespace FS void fat16::init() { - m_Create = findExternal("mkfs.msdos") ? SupportExternal : SupportNone; - m_GetUsed = m_Check = findExternal("fsck.msdos", QStringList(), 2) ? SupportExternal : SupportNone; - m_GetLabel = SupportInternal; - m_SetLabel = SupportExternal; - m_Grow = SupportInternal; - m_Shrink = SupportInternal; - m_Move = SupportInternal; - m_Copy = SupportInternal; - m_Backup = SupportInternal; - m_UpdateUUID = findExternal("dd") ? SupportExternal : SupportNone; - m_GetUUID = SupportInternal; + m_Create = findExternal("mkfs.msdos") ? cmdSupportFileSystem : cmdSupportNone; + m_GetUsed = m_Check = findExternal("fsck.msdos", QStringList(), 2) ? cmdSupportFileSystem : cmdSupportNone; + m_GetLabel = cmdSupportCore; + m_SetLabel = cmdSupportFileSystem; + m_Grow = cmdSupportCore; + m_Shrink = cmdSupportCore; + m_Move = cmdSupportCore; + m_Copy = cmdSupportCore; + m_Backup = cmdSupportCore; + m_UpdateUUID = findExternal("dd") ? cmdSupportFileSystem : cmdSupportNone; + m_GetUUID = cmdSupportCore; } qint64 fat16::minCapacity() const diff --git a/src/fs/filesystem.h b/src/fs/filesystem.h index aa6369b..f649723 100644 --- a/src/fs/filesystem.h +++ b/src/fs/filesystem.h @@ -68,9 +68,9 @@ class FileSystem /** The type of support for a given FileSystem action */ enum CommandSupportType { - SupportNone = 0, /**< no support */ - SupportInternal = 1, /**< internal support */ - SupportExternal = 2 /**< supported by some external command */ + cmdSupportNone = 0, /**< no support */ + cmdSupportCore = 1, /**< internal support */ + cmdSupportFileSystem = 2 /**< supported by some external command */ }; Q_DECLARE_FLAGS(CommandSupportTypes, CommandSupportType) @@ -94,18 +94,29 @@ class FileSystem virtual QString readUUID(const QString& deviceNode) const; virtual bool updateBootSector(Report& report, const QString& deviceNode) const; - virtual CommandSupportType supportGetUsed() const { return SupportNone; } /**< @return CommandSupportType for getting used capacity */ - virtual CommandSupportType supportGetLabel() const { return SupportNone; } /**< @return CommandSupportType for reading label*/ - virtual CommandSupportType supportCreate() const { return SupportNone; } /**< @return CommandSupportType for creating */ - virtual CommandSupportType supportGrow() const { return SupportNone; } /**< @return CommandSupportType for growing */ - virtual CommandSupportType supportShrink() const { return SupportNone; } /**< @return CommandSupportType for shrinking */ - virtual CommandSupportType supportMove() const { return SupportNone; } /**< @return CommandSupportType for moving */ - virtual CommandSupportType supportCheck() const { return SupportNone; } /**< @return CommandSupportType for checking */ - virtual CommandSupportType supportCopy() const { return SupportNone; } /**< @return CommandSupportType for copying */ - virtual CommandSupportType supportBackup() const { return SupportNone; } /**< @return CommandSupportType for backing up */ - virtual CommandSupportType supportSetLabel() const { return SupportNone; } /**< @return CommandSupportType for setting label*/ - virtual CommandSupportType supportUpdateUUID() const { return SupportNone; } /**< @return CommandSupportType for updating the UUID */ - virtual CommandSupportType supportGetUUID() const { return SupportNone; } /**< @return CommandSupportType for reading the UUID */ + virtual CommandSupportType supportGetUsed() const { return cmdSupportNone; } /**< @return CommandSupportType for getting used capacity */ + virtual CommandSupportType supportGetLabel() const { return cmdSupportNone +; } /**< @return CommandSupportType for reading label*/ + virtual CommandSupportType supportCreate() const { return cmdSupportNone +; } /**< @return CommandSupportType for creating */ + virtual CommandSupportType supportGrow() const { return cmdSupportNone +; } /**< @return CommandSupportType for growing */ + virtual CommandSupportType supportShrink() const { return cmdSupportNone +; } /**< @return CommandSupportType for shrinking */ + virtual CommandSupportType supportMove() const { return cmdSupportNone +; } /**< @return CommandSupportType for moving */ + virtual CommandSupportType supportCheck() const { return cmdSupportNone +; } /**< @return CommandSupportType for checking */ + virtual CommandSupportType supportCopy() const { return cmdSupportNone +; } /**< @return CommandSupportType for copying */ + virtual CommandSupportType supportBackup() const { return cmdSupportNone +; } /**< @return CommandSupportType for backing up */ + virtual CommandSupportType supportSetLabel() const { return cmdSupportNone +; } /**< @return CommandSupportType for setting label*/ + virtual CommandSupportType supportUpdateUUID() const { return cmdSupportNone +; } /**< @return CommandSupportType for updating the UUID */ + virtual CommandSupportType supportGetUUID() const { return cmdSupportNone +; } /**< @return CommandSupportType for reading the UUID */ virtual qint64 minCapacity() const; virtual qint64 maxCapacity() const; diff --git a/src/fs/hfs.cpp b/src/fs/hfs.cpp index 0fec135..18066f7 100644 --- a/src/fs/hfs.cpp +++ b/src/fs/hfs.cpp @@ -27,14 +27,14 @@ namespace FS { - FileSystem::CommandSupportType hfs::m_GetUsed = FileSystem::SupportNone; - FileSystem::CommandSupportType hfs::m_GetLabel = FileSystem::SupportNone; - FileSystem::CommandSupportType hfs::m_Create = FileSystem::SupportNone; - FileSystem::CommandSupportType hfs::m_Shrink = FileSystem::SupportNone; - FileSystem::CommandSupportType hfs::m_Move = FileSystem::SupportNone; - FileSystem::CommandSupportType hfs::m_Check = FileSystem::SupportNone; - FileSystem::CommandSupportType hfs::m_Copy = FileSystem::SupportNone; - FileSystem::CommandSupportType hfs::m_Backup = FileSystem::SupportNone; + FileSystem::CommandSupportType hfs::m_GetUsed = FileSystem::cmdSupportNone; + FileSystem::CommandSupportType hfs::m_GetLabel = FileSystem::cmdSupportNone; + FileSystem::CommandSupportType hfs::m_Create = FileSystem::cmdSupportNone; + FileSystem::CommandSupportType hfs::m_Shrink = FileSystem::cmdSupportNone; + FileSystem::CommandSupportType hfs::m_Move = FileSystem::cmdSupportNone; + FileSystem::CommandSupportType hfs::m_Check = FileSystem::cmdSupportNone; + FileSystem::CommandSupportType hfs::m_Copy = FileSystem::cmdSupportNone; + FileSystem::CommandSupportType hfs::m_Backup = FileSystem::cmdSupportNone; hfs::hfs(qint64 firstsector, qint64 lastsector, qint64 sectorsused, const QString& label) : FileSystem(firstsector, lastsector, sectorsused, label, FileSystem::Hfs) @@ -43,15 +43,15 @@ namespace FS void hfs::init() { - m_GetLabel = SupportInternal; - m_Create = findExternal("hformat") ? SupportExternal : SupportNone; - m_Check = findExternal("hfsck") ? SupportExternal : SupportNone; + m_GetLabel = cmdSupportCore; + m_Create = findExternal("hformat") ? cmdSupportFileSystem : cmdSupportNone; + m_Check = findExternal("hfsck") ? cmdSupportFileSystem : cmdSupportNone; - m_GetUsed = SupportInternal; - m_Shrink = SupportInternal; + m_GetUsed = cmdSupportCore; + m_Shrink = cmdSupportCore; - m_Move = m_Copy = (m_Check != SupportNone) ? SupportInternal : SupportNone; - m_Backup = SupportInternal; + m_Move = m_Copy = (m_Check != cmdSupportNone) ? cmdSupportCore : cmdSupportNone; + m_Backup = cmdSupportCore; } qint64 hfs::maxCapacity() const diff --git a/src/fs/hfsplus.cpp b/src/fs/hfsplus.cpp index 7e1363d..b9c4c46 100644 --- a/src/fs/hfsplus.cpp +++ b/src/fs/hfsplus.cpp @@ -26,12 +26,12 @@ namespace FS { - FileSystem::CommandSupportType hfsplus::m_GetUsed = FileSystem::SupportNone; - FileSystem::CommandSupportType hfsplus::m_Shrink = FileSystem::SupportNone; - FileSystem::CommandSupportType hfsplus::m_Move = FileSystem::SupportNone; - FileSystem::CommandSupportType hfsplus::m_Check = FileSystem::SupportNone; - FileSystem::CommandSupportType hfsplus::m_Copy = FileSystem::SupportNone; - FileSystem::CommandSupportType hfsplus::m_Backup = FileSystem::SupportNone; + FileSystem::CommandSupportType hfsplus::m_GetUsed = FileSystem::cmdSupportNone; + FileSystem::CommandSupportType hfsplus::m_Shrink = FileSystem::cmdSupportNone; + FileSystem::CommandSupportType hfsplus::m_Move = FileSystem::cmdSupportNone; + FileSystem::CommandSupportType hfsplus::m_Check = FileSystem::cmdSupportNone; + FileSystem::CommandSupportType hfsplus::m_Copy = FileSystem::cmdSupportNone; + FileSystem::CommandSupportType hfsplus::m_Backup = FileSystem::cmdSupportNone; hfsplus::hfsplus(qint64 firstsector, qint64 lastsector, qint64 sectorsused, const QString& label) : FileSystem(firstsector, lastsector, sectorsused, label, FileSystem::HfsPlus) @@ -40,13 +40,13 @@ namespace FS void hfsplus::init() { - m_Check = findExternal("hpfsck") ? SupportExternal : SupportNone; + m_Check = findExternal("hpfsck") ? cmdSupportFileSystem : cmdSupportNone; - m_GetUsed = SupportInternal; - m_Shrink = SupportInternal; - m_Copy = (m_Check != SupportNone) ? SupportInternal : SupportNone; - m_Move = (m_Check != SupportNone) ? SupportInternal : SupportNone; - m_Backup = SupportInternal; + m_GetUsed = cmdSupportCore; + m_Shrink = cmdSupportCore; + m_Copy = (m_Check != cmdSupportNone) ? cmdSupportCore : cmdSupportNone; + m_Move = (m_Check != cmdSupportNone) ? cmdSupportCore : cmdSupportNone; + m_Backup = cmdSupportCore; } qint64 hfsplus::maxCapacity() const diff --git a/src/fs/jfs.cpp b/src/fs/jfs.cpp index f830d8e..2de9e85 100644 --- a/src/fs/jfs.cpp +++ b/src/fs/jfs.cpp @@ -33,15 +33,15 @@ namespace FS { - FileSystem::CommandSupportType jfs::m_GetUsed = FileSystem::SupportNone; - FileSystem::CommandSupportType jfs::m_GetLabel = FileSystem::SupportNone; - FileSystem::CommandSupportType jfs::m_Create = FileSystem::SupportNone; - FileSystem::CommandSupportType jfs::m_Grow = FileSystem::SupportNone; - FileSystem::CommandSupportType jfs::m_Move = FileSystem::SupportNone; - FileSystem::CommandSupportType jfs::m_Check = FileSystem::SupportNone; - FileSystem::CommandSupportType jfs::m_Copy = FileSystem::SupportNone; - FileSystem::CommandSupportType jfs::m_Backup = FileSystem::SupportNone; - FileSystem::CommandSupportType jfs::m_SetLabel = FileSystem::SupportNone; + FileSystem::CommandSupportType jfs::m_GetUsed = FileSystem::cmdSupportNone; + FileSystem::CommandSupportType jfs::m_GetLabel = FileSystem::cmdSupportNone; + FileSystem::CommandSupportType jfs::m_Create = FileSystem::cmdSupportNone; + FileSystem::CommandSupportType jfs::m_Grow = FileSystem::cmdSupportNone; + FileSystem::CommandSupportType jfs::m_Move = FileSystem::cmdSupportNone; + FileSystem::CommandSupportType jfs::m_Check = FileSystem::cmdSupportNone; + FileSystem::CommandSupportType jfs::m_Copy = FileSystem::cmdSupportNone; + FileSystem::CommandSupportType jfs::m_Backup = FileSystem::cmdSupportNone; + FileSystem::CommandSupportType jfs::m_SetLabel = FileSystem::cmdSupportNone; jfs::jfs(qint64 firstsector, qint64 lastsector, qint64 sectorsused, const QString& label) : FileSystem(firstsector, lastsector, sectorsused, label, FileSystem::Jfs) @@ -50,13 +50,13 @@ namespace FS void jfs::init() { - m_GetUsed = findExternal("jfs_debugfs") ? SupportExternal : SupportNone; - m_GetLabel = SupportInternal; - m_SetLabel = findExternal("jfs_tune", QStringList() << "-V") ? SupportExternal : SupportNone; - m_Create = findExternal("mkfs.jfs", QStringList() << "-V") ? SupportExternal : SupportNone; - m_Grow = m_Check = findExternal("fsck.jfs", QStringList() << "-V") ? SupportExternal : SupportNone; - m_Copy = m_Move = (m_Check != SupportNone) ? SupportInternal : SupportNone; - m_Backup = SupportInternal; + m_GetUsed = findExternal("jfs_debugfs") ? cmdSupportFileSystem : cmdSupportNone; + m_GetLabel = cmdSupportCore; + m_SetLabel = findExternal("jfs_tune", QStringList() << "-V") ? cmdSupportFileSystem : cmdSupportNone; + m_Create = findExternal("mkfs.jfs", QStringList() << "-V") ? cmdSupportFileSystem : cmdSupportNone; + m_Grow = m_Check = findExternal("fsck.jfs", QStringList() << "-V") ? cmdSupportFileSystem : cmdSupportNone; + m_Copy = m_Move = (m_Check != cmdSupportNone) ? cmdSupportCore : cmdSupportNone; + m_Backup = cmdSupportCore; } qint64 jfs::minCapacity() const diff --git a/src/fs/linuxswap.cpp b/src/fs/linuxswap.cpp index 03e8d10..b7a0907 100644 --- a/src/fs/linuxswap.cpp +++ b/src/fs/linuxswap.cpp @@ -25,14 +25,14 @@ namespace FS { - FileSystem::CommandSupportType linuxswap::m_Create = FileSystem::SupportNone; - FileSystem::CommandSupportType linuxswap::m_Grow = FileSystem::SupportNone; - FileSystem::CommandSupportType linuxswap::m_Shrink = FileSystem::SupportNone; - FileSystem::CommandSupportType linuxswap::m_Move = FileSystem::SupportNone; - FileSystem::CommandSupportType linuxswap::m_Copy = FileSystem::SupportNone; - FileSystem::CommandSupportType linuxswap::m_GetLabel = FileSystem::SupportNone; - FileSystem::CommandSupportType linuxswap::m_SetLabel = FileSystem::SupportNone; - FileSystem::CommandSupportType linuxswap::m_GetUUID = FileSystem::SupportNone; + FileSystem::CommandSupportType linuxswap::m_Create = FileSystem::cmdSupportNone; + FileSystem::CommandSupportType linuxswap::m_Grow = FileSystem::cmdSupportNone; + FileSystem::CommandSupportType linuxswap::m_Shrink = FileSystem::cmdSupportNone; + FileSystem::CommandSupportType linuxswap::m_Move = FileSystem::cmdSupportNone; + FileSystem::CommandSupportType linuxswap::m_Copy = FileSystem::cmdSupportNone; + FileSystem::CommandSupportType linuxswap::m_GetLabel = FileSystem::cmdSupportNone; + FileSystem::CommandSupportType linuxswap::m_SetLabel = FileSystem::cmdSupportNone; + FileSystem::CommandSupportType linuxswap::m_GetUUID = FileSystem::cmdSupportNone; linuxswap::linuxswap(qint64 firstsector, qint64 lastsector, qint64 sectorsused, const QString& label) : FileSystem(firstsector, lastsector, sectorsused, label, FileSystem::LinuxSwap) @@ -41,11 +41,11 @@ namespace FS void linuxswap::init() { - m_SetLabel = m_Shrink = m_Grow = m_Create = (findExternal("mkswap")) ? SupportExternal : SupportNone; - m_GetLabel = SupportInternal; - m_Copy = SupportInternal; - m_Move = SupportInternal; - m_GetUUID = SupportInternal; + m_SetLabel = m_Shrink = m_Grow = m_Create = (findExternal("mkswap")) ? cmdSupportFileSystem : cmdSupportNone; + m_GetLabel = cmdSupportCore; + m_Copy = cmdSupportCore; + m_Move = cmdSupportCore; + m_GetUUID = cmdSupportCore; } bool linuxswap::create(Report& report, const QString& deviceNode) const diff --git a/src/fs/ntfs.cpp b/src/fs/ntfs.cpp index 3b21339..46d25ac 100644 --- a/src/fs/ntfs.cpp +++ b/src/fs/ntfs.cpp @@ -37,18 +37,18 @@ namespace FS { - FileSystem::CommandSupportType ntfs::m_GetUsed = FileSystem::SupportNone; - FileSystem::CommandSupportType ntfs::m_GetLabel = FileSystem::SupportNone; - FileSystem::CommandSupportType ntfs::m_Create = FileSystem::SupportNone; - FileSystem::CommandSupportType ntfs::m_Grow = FileSystem::SupportNone; - FileSystem::CommandSupportType ntfs::m_Shrink = FileSystem::SupportNone; - FileSystem::CommandSupportType ntfs::m_Move = FileSystem::SupportNone; - FileSystem::CommandSupportType ntfs::m_Check = FileSystem::SupportNone; - FileSystem::CommandSupportType ntfs::m_Copy = FileSystem::SupportNone; - FileSystem::CommandSupportType ntfs::m_Backup = FileSystem::SupportNone; - FileSystem::CommandSupportType ntfs::m_SetLabel = FileSystem::SupportNone; - FileSystem::CommandSupportType ntfs::m_UpdateUUID = FileSystem::SupportNone; - FileSystem::CommandSupportType ntfs::m_GetUUID = FileSystem::SupportNone; + FileSystem::CommandSupportType ntfs::m_GetUsed = FileSystem::cmdSupportNone; + FileSystem::CommandSupportType ntfs::m_GetLabel = FileSystem::cmdSupportNone; + FileSystem::CommandSupportType ntfs::m_Create = FileSystem::cmdSupportNone; + FileSystem::CommandSupportType ntfs::m_Grow = FileSystem::cmdSupportNone; + FileSystem::CommandSupportType ntfs::m_Shrink = FileSystem::cmdSupportNone; + FileSystem::CommandSupportType ntfs::m_Move = FileSystem::cmdSupportNone; + FileSystem::CommandSupportType ntfs::m_Check = FileSystem::cmdSupportNone; + FileSystem::CommandSupportType ntfs::m_Copy = FileSystem::cmdSupportNone; + FileSystem::CommandSupportType ntfs::m_Backup = FileSystem::cmdSupportNone; + FileSystem::CommandSupportType ntfs::m_SetLabel = FileSystem::cmdSupportNone; + FileSystem::CommandSupportType ntfs::m_UpdateUUID = FileSystem::cmdSupportNone; + FileSystem::CommandSupportType ntfs::m_GetUUID = FileSystem::cmdSupportNone; ntfs::ntfs(qint64 firstsector, qint64 lastsector, qint64 sectorsused, const QString& label) : FileSystem(firstsector, lastsector, sectorsused, label, FileSystem::Ntfs) @@ -57,15 +57,15 @@ namespace FS void ntfs::init() { - m_Shrink = m_Grow = m_Check = m_GetUsed = findExternal("ntfsresize") ? SupportExternal : SupportNone; - m_GetLabel = SupportInternal; - m_SetLabel = findExternal("ntfslabel") ? SupportExternal : SupportNone; - m_Create = findExternal("mkfs.ntfs") ? SupportExternal : SupportNone; - m_Copy = findExternal("ntfsclone") ? SupportExternal : SupportNone; - m_Backup = SupportInternal; - m_UpdateUUID = findExternal("dd") ? SupportExternal : SupportNone; - m_Move = (m_Check != SupportNone) ? SupportInternal : SupportNone; - m_GetUUID = SupportInternal; + m_Shrink = m_Grow = m_Check = m_GetUsed = findExternal("ntfsresize") ? cmdSupportFileSystem : cmdSupportNone; + m_GetLabel = cmdSupportCore; + m_SetLabel = findExternal("ntfslabel") ? cmdSupportFileSystem : cmdSupportNone; + m_Create = findExternal("mkfs.ntfs") ? cmdSupportFileSystem : cmdSupportNone; + m_Copy = findExternal("ntfsclone") ? cmdSupportFileSystem : cmdSupportNone; + m_Backup = cmdSupportCore; + m_UpdateUUID = findExternal("dd") ? cmdSupportFileSystem : cmdSupportNone; + m_Move = (m_Check != cmdSupportNone) ? cmdSupportCore : cmdSupportNone; + m_GetUUID = cmdSupportCore; } qint64 ntfs::maxCapacity() const diff --git a/src/fs/reiser4.cpp b/src/fs/reiser4.cpp index b3adb81..b346b10 100644 --- a/src/fs/reiser4.cpp +++ b/src/fs/reiser4.cpp @@ -26,13 +26,13 @@ namespace FS { - FileSystem::CommandSupportType reiser4::m_GetUsed = FileSystem::SupportNone; - FileSystem::CommandSupportType reiser4::m_GetLabel = FileSystem::SupportNone; - FileSystem::CommandSupportType reiser4::m_Create = FileSystem::SupportNone; - FileSystem::CommandSupportType reiser4::m_Move = FileSystem::SupportNone; - FileSystem::CommandSupportType reiser4::m_Check = FileSystem::SupportNone; - FileSystem::CommandSupportType reiser4::m_Copy = FileSystem::SupportNone; - FileSystem::CommandSupportType reiser4::m_Backup = FileSystem::SupportNone; + FileSystem::CommandSupportType reiser4::m_GetUsed = FileSystem::cmdSupportNone; + FileSystem::CommandSupportType reiser4::m_GetLabel = FileSystem::cmdSupportNone; + FileSystem::CommandSupportType reiser4::m_Create = FileSystem::cmdSupportNone; + FileSystem::CommandSupportType reiser4::m_Move = FileSystem::cmdSupportNone; + FileSystem::CommandSupportType reiser4::m_Check = FileSystem::cmdSupportNone; + FileSystem::CommandSupportType reiser4::m_Copy = FileSystem::cmdSupportNone; + FileSystem::CommandSupportType reiser4::m_Backup = FileSystem::cmdSupportNone; reiser4::reiser4(qint64 firstsector, qint64 lastsector, qint64 sectorsused, const QString& label) : FileSystem(firstsector, lastsector, sectorsused, label, FileSystem::Reiser4) @@ -41,12 +41,12 @@ namespace FS void reiser4::init() { - m_GetLabel = SupportInternal; - m_GetUsed = findExternal("debugfs.reiser4", QStringList(), 16) ? SupportExternal : SupportNone; - m_Create = findExternal("mkfs.reiser4", QStringList(), 16) ? SupportExternal : SupportNone; - m_Check = findExternal("fsck.reiser4", QStringList(), 16) ? SupportExternal : SupportNone; - m_Move = m_Copy = (m_Check != SupportNone) ? SupportInternal : SupportNone; - m_Backup = SupportInternal; + m_GetLabel = cmdSupportCore; + m_GetUsed = findExternal("debugfs.reiser4", QStringList(), 16) ? cmdSupportFileSystem : cmdSupportNone; + m_Create = findExternal("mkfs.reiser4", QStringList(), 16) ? cmdSupportFileSystem : cmdSupportNone; + m_Check = findExternal("fsck.reiser4", QStringList(), 16) ? cmdSupportFileSystem : cmdSupportNone; + m_Move = m_Copy = (m_Check != cmdSupportNone) ? cmdSupportCore : cmdSupportNone; + m_Backup = cmdSupportCore; } qint64 reiser4::readUsedCapacity(const QString& deviceNode) const diff --git a/src/fs/reiserfs.cpp b/src/fs/reiserfs.cpp index cea5edf..ac8ec44 100644 --- a/src/fs/reiserfs.cpp +++ b/src/fs/reiserfs.cpp @@ -29,18 +29,18 @@ namespace FS { - FileSystem::CommandSupportType reiserfs::m_GetUsed = FileSystem::SupportNone; - FileSystem::CommandSupportType reiserfs::m_GetLabel = FileSystem::SupportNone; - FileSystem::CommandSupportType reiserfs::m_Create = FileSystem::SupportNone; - FileSystem::CommandSupportType reiserfs::m_Grow = FileSystem::SupportNone; - FileSystem::CommandSupportType reiserfs::m_Shrink = FileSystem::SupportNone; - FileSystem::CommandSupportType reiserfs::m_Move = FileSystem::SupportNone; - FileSystem::CommandSupportType reiserfs::m_Check = FileSystem::SupportNone; - FileSystem::CommandSupportType reiserfs::m_Copy = FileSystem::SupportNone; - FileSystem::CommandSupportType reiserfs::m_Backup = FileSystem::SupportNone; - FileSystem::CommandSupportType reiserfs::m_SetLabel = FileSystem::SupportNone; - FileSystem::CommandSupportType reiserfs::m_UpdateUUID = FileSystem::SupportNone; - FileSystem::CommandSupportType reiserfs::m_GetUUID = FileSystem::SupportNone; + FileSystem::CommandSupportType reiserfs::m_GetUsed = FileSystem::cmdSupportNone; + FileSystem::CommandSupportType reiserfs::m_GetLabel = FileSystem::cmdSupportNone; + FileSystem::CommandSupportType reiserfs::m_Create = FileSystem::cmdSupportNone; + FileSystem::CommandSupportType reiserfs::m_Grow = FileSystem::cmdSupportNone; + FileSystem::CommandSupportType reiserfs::m_Shrink = FileSystem::cmdSupportNone; + FileSystem::CommandSupportType reiserfs::m_Move = FileSystem::cmdSupportNone; + FileSystem::CommandSupportType reiserfs::m_Check = FileSystem::cmdSupportNone; + FileSystem::CommandSupportType reiserfs::m_Copy = FileSystem::cmdSupportNone; + FileSystem::CommandSupportType reiserfs::m_Backup = FileSystem::cmdSupportNone; + FileSystem::CommandSupportType reiserfs::m_SetLabel = FileSystem::cmdSupportNone; + FileSystem::CommandSupportType reiserfs::m_UpdateUUID = FileSystem::cmdSupportNone; + FileSystem::CommandSupportType reiserfs::m_GetUUID = FileSystem::cmdSupportNone; reiserfs::reiserfs(qint64 firstsector, qint64 lastsector, qint64 sectorsused, const QString& label) : FileSystem(firstsector, lastsector, sectorsused, label, FileSystem::ReiserFS) @@ -49,17 +49,17 @@ namespace FS void reiserfs::init() { - m_GetLabel = SupportInternal; - m_GetUsed = findExternal("debugreiserfs", QStringList(), 16) ? SupportExternal : SupportNone; - m_SetLabel = findExternal("reiserfstune") ? SupportExternal : SupportNone; - m_Create = findExternal("mkfs.reiserfs") ? SupportExternal : SupportNone; - m_Check = findExternal("fsck.reiserfs") ? SupportExternal : SupportNone; - m_Move = m_Copy = (m_Check != SupportNone) ? SupportInternal : SupportNone; - m_Grow = findExternal("resize_reiserfs", QStringList(), 16) ? SupportExternal : SupportNone; - m_Shrink = (m_GetUsed != SupportNone && m_Grow != SupportNone) ? SupportExternal : SupportNone; - m_Backup = SupportInternal; - m_UpdateUUID = findExternal("reiserfstune") ? SupportExternal : SupportNone; - m_GetUUID = SupportInternal; + m_GetLabel = cmdSupportCore; + m_GetUsed = findExternal("debugreiserfs", QStringList(), 16) ? cmdSupportFileSystem : cmdSupportNone; + m_SetLabel = findExternal("reiserfstune") ? cmdSupportFileSystem : cmdSupportNone; + m_Create = findExternal("mkfs.reiserfs") ? cmdSupportFileSystem : cmdSupportNone; + m_Check = findExternal("fsck.reiserfs") ? cmdSupportFileSystem : cmdSupportNone; + m_Move = m_Copy = (m_Check != cmdSupportNone) ? cmdSupportCore : cmdSupportNone; + m_Grow = findExternal("resize_reiserfs", QStringList(), 16) ? cmdSupportFileSystem : cmdSupportNone; + m_Shrink = (m_GetUsed != cmdSupportNone && m_Grow != cmdSupportNone) ? cmdSupportFileSystem : cmdSupportNone; + m_Backup = cmdSupportCore; + m_UpdateUUID = findExternal("reiserfstune") ? cmdSupportFileSystem : cmdSupportNone; + m_GetUUID = cmdSupportCore; } qint64 reiserfs::minCapacity() const diff --git a/src/fs/ufs.cpp b/src/fs/ufs.cpp index 72312be..a99c340 100644 --- a/src/fs/ufs.cpp +++ b/src/fs/ufs.cpp @@ -21,9 +21,9 @@ namespace FS { - FileSystem::CommandSupportType ufs::m_Move = FileSystem::SupportInternal; - FileSystem::CommandSupportType ufs::m_Copy = FileSystem::SupportInternal; - FileSystem::CommandSupportType ufs::m_Backup = FileSystem::SupportInternal; + FileSystem::CommandSupportType ufs::m_Move = FileSystem::cmdSupportCore; + FileSystem::CommandSupportType ufs::m_Copy = FileSystem::cmdSupportCore; + FileSystem::CommandSupportType ufs::m_Backup = FileSystem::cmdSupportCore; ufs::ufs(qint64 firstsector, qint64 lastsector, qint64 sectorsused, const QString& label) : FileSystem(firstsector, lastsector, sectorsused, label, FileSystem::Ufs) diff --git a/src/fs/unformatted.cpp b/src/fs/unformatted.cpp index d58690d..0e616f2 100644 --- a/src/fs/unformatted.cpp +++ b/src/fs/unformatted.cpp @@ -21,7 +21,7 @@ namespace FS { - FileSystem::CommandSupportType unformatted::m_Create = FileSystem::SupportExternal; + FileSystem::CommandSupportType unformatted::m_Create = FileSystem::cmdSupportFileSystem; unformatted::unformatted(qint64 firstsector, qint64 lastsector, qint64 sectorsused, const QString& label) : FileSystem(firstsector, lastsector, sectorsused, label, FileSystem::Unformatted) diff --git a/src/fs/xfs.cpp b/src/fs/xfs.cpp index d95081f..7a80685 100644 --- a/src/fs/xfs.cpp +++ b/src/fs/xfs.cpp @@ -34,15 +34,15 @@ namespace FS { - FileSystem::CommandSupportType xfs::m_GetUsed = FileSystem::SupportNone; - FileSystem::CommandSupportType xfs::m_GetLabel = FileSystem::SupportNone; - FileSystem::CommandSupportType xfs::m_Create = FileSystem::SupportNone; - FileSystem::CommandSupportType xfs::m_Grow = FileSystem::SupportNone; - FileSystem::CommandSupportType xfs::m_Move = FileSystem::SupportNone; - FileSystem::CommandSupportType xfs::m_Check = FileSystem::SupportNone; - FileSystem::CommandSupportType xfs::m_Copy = FileSystem::SupportNone; - FileSystem::CommandSupportType xfs::m_Backup = FileSystem::SupportNone; - FileSystem::CommandSupportType xfs::m_SetLabel = FileSystem::SupportNone; + FileSystem::CommandSupportType xfs::m_GetUsed = FileSystem::cmdSupportNone; + FileSystem::CommandSupportType xfs::m_GetLabel = FileSystem::cmdSupportNone; + FileSystem::CommandSupportType xfs::m_Create = FileSystem::cmdSupportNone; + FileSystem::CommandSupportType xfs::m_Grow = FileSystem::cmdSupportNone; + FileSystem::CommandSupportType xfs::m_Move = FileSystem::cmdSupportNone; + FileSystem::CommandSupportType xfs::m_Check = FileSystem::cmdSupportNone; + FileSystem::CommandSupportType xfs::m_Copy = FileSystem::cmdSupportNone; + FileSystem::CommandSupportType xfs::m_Backup = FileSystem::cmdSupportNone; + FileSystem::CommandSupportType xfs::m_SetLabel = FileSystem::cmdSupportNone; xfs::xfs(qint64 firstsector, qint64 lastsector, qint64 sectorsused, const QString& label) : FileSystem(firstsector, lastsector, sectorsused, label, FileSystem::Xfs) @@ -51,15 +51,15 @@ namespace FS void xfs::init() { - m_GetLabel = SupportInternal; - m_SetLabel = m_GetUsed = findExternal("xfs_db") ? SupportExternal : SupportNone; - m_Create = findExternal("mkfs.xfs") ? SupportExternal : SupportNone; + m_GetLabel = cmdSupportCore; + m_SetLabel = m_GetUsed = findExternal("xfs_db") ? cmdSupportFileSystem : cmdSupportNone; + m_Create = findExternal("mkfs.xfs") ? cmdSupportFileSystem : cmdSupportNone; - m_Check = findExternal("xfs_repair") ? SupportExternal : SupportNone; - m_Grow = (findExternal("xfs_growfs", QStringList() << "-V") && m_Check != SupportNone) ? SupportExternal : SupportNone; - m_Copy = findExternal("xfs_copy") ? SupportExternal : SupportNone; - m_Move = (m_Check != SupportNone) ? SupportInternal : SupportNone; - m_Backup = SupportInternal; + m_Check = findExternal("xfs_repair") ? cmdSupportFileSystem : cmdSupportNone; + m_Grow = (findExternal("xfs_growfs", QStringList() << "-V") && m_Check != cmdSupportNone) ? cmdSupportFileSystem : cmdSupportNone; + m_Copy = findExternal("xfs_copy") ? cmdSupportFileSystem : cmdSupportNone; + m_Move = (m_Check != cmdSupportNone) ? cmdSupportCore : cmdSupportNone; + m_Backup = cmdSupportCore; } qint64 xfs::minCapacity() const diff --git a/src/gui/newdialog.cpp b/src/gui/newdialog.cpp index e28f83a..07f46b7 100644 --- a/src/gui/newdialog.cpp +++ b/src/gui/newdialog.cpp @@ -63,7 +63,7 @@ void NewDialog::setupDialog() { QStringList fsNames; foreach (const FileSystem* fs, FileSystemFactory::map()) - if (fs->supportCreate() != FileSystem::SupportNone && fs->type() != FileSystem::Extended) + if (fs->supportCreate() != FileSystem::cmdSupportNone && fs->type() != FileSystem::Extended) fsNames.append(fs->name()); qSort(fsNames.begin(), fsNames.end(), caseInsensitiveLessThan); @@ -149,7 +149,7 @@ void NewDialog::onLabelChanged(const QString& newLabel) void NewDialog::updateHideAndShow() { // this is mostly copy'n'pasted from PartPropsDialog::updateHideAndShow() - if (partition().roles().has(PartitionRole::Extended) || partition().fileSystem().supportSetLabel() == FileSystem::SupportNone) + if (partition().roles().has(PartitionRole::Extended) || partition().fileSystem().supportSetLabel() == FileSystem::cmdSupportNone) { dialogWidget().label().setReadOnly(true); dialogWidget().noSetLabel().setVisible(true); diff --git a/src/gui/partpropsdialog.cpp b/src/gui/partpropsdialog.cpp index bfecf90..3a49455 100644 --- a/src/gui/partpropsdialog.cpp +++ b/src/gui/partpropsdialog.cpp @@ -169,7 +169,7 @@ void PartPropsDialog::updateHideAndShow() // create a temporary fs for some checks const FileSystem* fs = FileSystemFactory::create(newFileSystemType(), -1, -1, -1, ""); - if (fs == NULL || fs->supportSetLabel() == FileSystem::SupportNone) + if (fs == NULL || fs->supportSetLabel() == FileSystem::cmdSupportNone) { dialogWidget().label().setReadOnly(true); dialogWidget().noSetLabel().setVisible(true); @@ -190,7 +190,7 @@ void PartPropsDialog::updateHideAndShow() // when do we show the uuid? const bool showUuid = partition().state() != Partition::StateNew && // not for new partitions - !(fs == NULL || fs->supportGetUUID() == FileSystem::SupportNone); // not if the FS doesn't support it + !(fs == NULL || fs->supportGetUUID() == FileSystem::cmdSupportNone); // not if the FS doesn't support it dialogWidget().showUuid(showUuid); @@ -216,7 +216,7 @@ void PartPropsDialog::updateHideAndShow() // when do we show the recreate file system check box? const bool showCheckRecreate = showFileSystem && // only if we also show the file system - partition().fileSystem().supportCreate() != FileSystem::SupportNone && // and support creating this file system + partition().fileSystem().supportCreate() != FileSystem::cmdSupportNone && // and support creating this file system partition().fileSystem().type() != FileSystem::Unknown && // and not for unknown file systems partition().state() != Partition::StateNew; // or new partitions @@ -263,7 +263,7 @@ void PartPropsDialog::setupFileSystemComboBox() QStringList fsNames; foreach(const FileSystem* fs, FileSystemFactory::map()) - if (partition().fileSystem().type() == fs->type() || (fs->supportCreate() != FileSystem::SupportNone && partition().capacity() >= fs->minCapacity() && partition().capacity() <= fs->maxCapacity())) + if (partition().fileSystem().type() == fs->type() || (fs->supportCreate() != FileSystem::cmdSupportNone && partition().capacity() >= fs->minCapacity() && partition().capacity() <= fs->maxCapacity())) { QString name = fs->name(); diff --git a/src/jobs/backupfilesystemjob.cpp b/src/jobs/backupfilesystemjob.cpp index 558d83d..ce97bc6 100644 --- a/src/jobs/backupfilesystemjob.cpp +++ b/src/jobs/backupfilesystemjob.cpp @@ -54,9 +54,9 @@ bool BackupFileSystemJob::run(Report& parent) Report* report = jobStarted(parent); - if (sourcePartition().fileSystem().supportBackup() == FileSystem::SupportExternal) + if (sourcePartition().fileSystem().supportBackup() == FileSystem::cmdSupportFileSystem) rval = sourcePartition().fileSystem().backup(*report, sourceDevice(), sourcePartition().deviceNode(), fileName()); - else if (sourcePartition().fileSystem().supportBackup() == FileSystem::SupportInternal) + else if (sourcePartition().fileSystem().supportBackup() == FileSystem::cmdSupportCore) { CopySourceDevice copySource(sourceDevice(), sourcePartition().fileSystem().firstSector(), sourcePartition().fileSystem().lastSector()); CopyTargetFile copyTarget(fileName(), sourceDevice().sectorSize()); diff --git a/src/jobs/checkfilesystemjob.cpp b/src/jobs/checkfilesystemjob.cpp index 11e484c..2111edb 100644 --- a/src/jobs/checkfilesystemjob.cpp +++ b/src/jobs/checkfilesystemjob.cpp @@ -43,7 +43,7 @@ bool CheckFileSystemJob::run(Report& parent) // if we cannot check, assume everything is fine bool rval = true; - if (partition().fileSystem().supportCheck() == FileSystem::SupportExternal) + if (partition().fileSystem().supportCheck() == FileSystem::cmdSupportFileSystem) rval = partition().fileSystem().check(*report, partition().deviceNode()); jobFinished(*report, rval); diff --git a/src/jobs/copyfilesystemjob.cpp b/src/jobs/copyfilesystemjob.cpp index 1483238..8565a7e 100644 --- a/src/jobs/copyfilesystemjob.cpp +++ b/src/jobs/copyfilesystemjob.cpp @@ -59,9 +59,9 @@ bool CopyFileSystemJob::run(Report& parent) if (targetPartition().fileSystem().length() < sourcePartition().fileSystem().length()) report->line() << i18nc("@info/plain", "Cannot copy file system: File system on target partition %1 is smaller than the file system on source partition %2.", targetPartition().deviceNode(), sourcePartition().deviceNode()); - else if (sourcePartition().fileSystem().supportCopy() == FileSystem::SupportExternal) + else if (sourcePartition().fileSystem().supportCopy() == FileSystem::cmdSupportFileSystem) rval = sourcePartition().fileSystem().copy(*report, targetPartition().deviceNode(), sourcePartition().deviceNode()); - else if (sourcePartition().fileSystem().supportCopy() == FileSystem::SupportInternal) + else if (sourcePartition().fileSystem().supportCopy() == FileSystem::cmdSupportCore) { CopySourceDevice copySource(sourceDevice(), sourcePartition().fileSystem().firstSector(), sourcePartition().fileSystem().lastSector()); CopyTargetDevice copyTarget(targetDevice(), targetPartition().fileSystem().firstSector(), targetPartition().fileSystem().lastSector()); @@ -85,7 +85,7 @@ bool CopyFileSystemJob::run(Report& parent) targetPartition().fileSystem().setLastSector(newLastSector); // and set a new UUID, if the target filesystem supports UUIDs - if (targetPartition().fileSystem().supportUpdateUUID() == FileSystem::SupportExternal) + if (targetPartition().fileSystem().supportUpdateUUID() == FileSystem::cmdSupportFileSystem) { targetPartition().fileSystem().updateUUID(*report, targetPartition().deviceNode()); targetPartition().fileSystem().setUUID(targetPartition().fileSystem().readUUID(targetPartition().deviceNode())); diff --git a/src/jobs/createfilesystemjob.cpp b/src/jobs/createfilesystemjob.cpp index 316c141..1be0d11 100644 --- a/src/jobs/createfilesystemjob.cpp +++ b/src/jobs/createfilesystemjob.cpp @@ -42,7 +42,7 @@ bool CreateFileSystemJob::run(Report& parent) Report* report = jobStarted(parent); - if (partition().fileSystem().supportCreate() == FileSystem::SupportExternal) + if (partition().fileSystem().supportCreate() == FileSystem::cmdSupportFileSystem) rval = partition().fileSystem().create(*report, partition().deviceNode()); jobFinished(*report, rval); diff --git a/src/jobs/resizefilesystemjob.cpp b/src/jobs/resizefilesystemjob.cpp index 82f3c4f..cd70c75 100644 --- a/src/jobs/resizefilesystemjob.cpp +++ b/src/jobs/resizefilesystemjob.cpp @@ -80,7 +80,7 @@ bool ResizeFileSystemJob::run(Report& parent) switch(support) { - case FileSystem::SupportInternal: + case FileSystem::cmdSupportCore: { Report* childReport = report->newChild(); childReport->line() << i18nc("@info/plain", "Resizing a %1 file system using LibParted internal functions.", partition().fileSystem().name()); @@ -88,7 +88,7 @@ bool ResizeFileSystemJob::run(Report& parent) break; } - case FileSystem::SupportExternal: + case FileSystem::cmdSupportFileSystem: { const qint64 newLengthInByte = Capacity(newLength() * partition().sectorSize()).toInt(Capacity::Byte); rval = partition().fileSystem().resize(*report, partition().deviceNode(), newLengthInByte); diff --git a/src/jobs/setfilesystemlabeljob.cpp b/src/jobs/setfilesystemlabeljob.cpp index fbe29a0..eb2f256 100644 --- a/src/jobs/setfilesystemlabeljob.cpp +++ b/src/jobs/setfilesystemlabeljob.cpp @@ -47,9 +47,9 @@ bool SetFileSystemLabelJob::run(Report& parent) // If there's no support for file system label setting for this file system, // just ignore the request and say all is well. This helps in operations because // we don't have to check for support to avoid having a failed job. - if (partition().fileSystem().supportSetLabel() == FileSystem::SupportNone) + if (partition().fileSystem().supportSetLabel() == FileSystem::cmdSupportNone) report->line() << i18nc("@info/plain", "File system on partition %1 does not support setting labels. Job ignored.", partition().deviceNode()); - else if (partition().fileSystem().supportSetLabel() == FileSystem::SupportExternal) + else if (partition().fileSystem().supportSetLabel() == FileSystem::cmdSupportFileSystem) { rval = partition().fileSystem().writeLabel(*report, partition().deviceNode(), label()); diff --git a/src/ops/backupoperation.cpp b/src/ops/backupoperation.cpp index 321e451..89134ff 100644 --- a/src/ops/backupoperation.cpp +++ b/src/ops/backupoperation.cpp @@ -65,6 +65,6 @@ bool BackupOperation::canBackup(const Partition* p) if (p->state() == Partition::StateNew || p->state() == Partition::StateCopy || p->state() == Partition::StateRestore) return false; - return p->fileSystem().supportBackup() != FileSystem::SupportNone; + return p->fileSystem().supportBackup() != FileSystem::cmdSupportNone; } diff --git a/src/ops/checkoperation.cpp b/src/ops/checkoperation.cpp index 2248d8d..b7a4ad1 100644 --- a/src/ops/checkoperation.cpp +++ b/src/ops/checkoperation.cpp @@ -63,6 +63,6 @@ bool CheckOperation::canCheck(const Partition* p) if (p->isMounted()) return false; - return p->fileSystem().supportCheck() != FileSystem::SupportNone; + return p->fileSystem().supportCheck() != FileSystem::cmdSupportNone; } diff --git a/src/ops/copyoperation.cpp b/src/ops/copyoperation.cpp index 8ef7a27..0baedce 100644 --- a/src/ops/copyoperation.cpp +++ b/src/ops/copyoperation.cpp @@ -293,7 +293,7 @@ bool CopyOperation::canCopy(const Partition* p) // be forbidden here. The operation stack, however, will take care of these // problematic cases when pushing the CopyOperation onto the stack. - return p->fileSystem().supportCopy() != FileSystem::SupportNone; + return p->fileSystem().supportCopy() != FileSystem::cmdSupportNone; } /** Can a Partition be pasted on another one? diff --git a/src/ops/resizeoperation.cpp b/src/ops/resizeoperation.cpp index 85f8663..ed55a3a 100644 --- a/src/ops/resizeoperation.cpp +++ b/src/ops/resizeoperation.cpp @@ -339,7 +339,7 @@ bool ResizeOperation::canGrow(const Partition* p) if (p->isMounted()) return false; - return p->fileSystem().supportGrow() != FileSystem::SupportNone; + return p->fileSystem().supportGrow() != FileSystem::cmdSupportNone; } /** Can a Partition be shrunk, i.e. decreased in size? @@ -361,7 +361,7 @@ bool ResizeOperation::canShrink(const Partition* p) if (p->isMounted()) return false; - return p->fileSystem().supportShrink() != FileSystem::SupportNone; + return p->fileSystem().supportShrink() != FileSystem::cmdSupportNone; } /** Can a Partition be moved? @@ -384,5 +384,5 @@ bool ResizeOperation::canMove(const Partition* p) if (p->roles().has(PartitionRole::Extended) && p->hasChildren()) return false; - return p->fileSystem().supportMove() != FileSystem::SupportNone; + return p->fileSystem().supportMove() != FileSystem::cmdSupportNone; }