rename all values in CommandSupportType to make them more unique
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1081018
This commit is contained in:
parent
84acbea6ac
commit
44af166f83
|
@ -108,9 +108,9 @@ static void readSectorsUsed(PedDisk* pedDisk, Partition& p, const QString& mount
|
||||||
|
|
||||||
if (freeSpaceInfo.isValid())
|
if (freeSpaceInfo.isValid())
|
||||||
p.fileSystem().setSectorsUsed(freeSpaceInfo.used() / p.sectorSize());
|
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());
|
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));
|
p.fileSystem().setSectorsUsed(readSectorsUsedLibParted(pedDisk, p));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -181,10 +181,10 @@ static void scanDevicePartitions(PedDevice* pedDevice, Device& d, PedDisk* pedDi
|
||||||
|
|
||||||
readSectorsUsed(pedDisk, *part, mountPoint);
|
readSectorsUsed(pedDisk, *part, mountPoint);
|
||||||
|
|
||||||
if (fs->supportGetLabel() != FileSystem::SupportNone)
|
if (fs->supportGetLabel() != FileSystem::cmdSupportNone)
|
||||||
fs->setLabel(fs->readLabel(part->deviceNode()));
|
fs->setLabel(fs->readLabel(part->deviceNode()));
|
||||||
|
|
||||||
if (fs->supportGetUUID() != FileSystem::SupportNone)
|
if (fs->supportGetUUID() != FileSystem::cmdSupportNone)
|
||||||
fs->setUUID(fs->readUUID(part->deviceNode()));
|
fs->setUUID(fs->readUUID(part->deviceNode()));
|
||||||
|
|
||||||
parent->append(part);
|
parent->append(part);
|
||||||
|
|
|
@ -27,18 +27,18 @@
|
||||||
|
|
||||||
namespace FS
|
namespace FS
|
||||||
{
|
{
|
||||||
FileSystem::CommandSupportType ext2::m_GetUsed = FileSystem::SupportNone;
|
FileSystem::CommandSupportType ext2::m_GetUsed = FileSystem::cmdSupportNone;
|
||||||
FileSystem::CommandSupportType ext2::m_GetLabel = FileSystem::SupportNone;
|
FileSystem::CommandSupportType ext2::m_GetLabel = FileSystem::cmdSupportNone;
|
||||||
FileSystem::CommandSupportType ext2::m_Create = FileSystem::SupportNone;
|
FileSystem::CommandSupportType ext2::m_Create = FileSystem::cmdSupportNone;
|
||||||
FileSystem::CommandSupportType ext2::m_Grow = FileSystem::SupportNone;
|
FileSystem::CommandSupportType ext2::m_Grow = FileSystem::cmdSupportNone;
|
||||||
FileSystem::CommandSupportType ext2::m_Shrink = FileSystem::SupportNone;
|
FileSystem::CommandSupportType ext2::m_Shrink = FileSystem::cmdSupportNone;
|
||||||
FileSystem::CommandSupportType ext2::m_Move = FileSystem::SupportNone;
|
FileSystem::CommandSupportType ext2::m_Move = FileSystem::cmdSupportNone;
|
||||||
FileSystem::CommandSupportType ext2::m_Check = FileSystem::SupportNone;
|
FileSystem::CommandSupportType ext2::m_Check = FileSystem::cmdSupportNone;
|
||||||
FileSystem::CommandSupportType ext2::m_Copy = FileSystem::SupportNone;
|
FileSystem::CommandSupportType ext2::m_Copy = FileSystem::cmdSupportNone;
|
||||||
FileSystem::CommandSupportType ext2::m_Backup = FileSystem::SupportNone;
|
FileSystem::CommandSupportType ext2::m_Backup = FileSystem::cmdSupportNone;
|
||||||
FileSystem::CommandSupportType ext2::m_SetLabel = FileSystem::SupportNone;
|
FileSystem::CommandSupportType ext2::m_SetLabel = FileSystem::cmdSupportNone;
|
||||||
FileSystem::CommandSupportType ext2::m_UpdateUUID = FileSystem::SupportNone;
|
FileSystem::CommandSupportType ext2::m_UpdateUUID = FileSystem::cmdSupportNone;
|
||||||
FileSystem::CommandSupportType ext2::m_GetUUID = FileSystem::SupportNone;
|
FileSystem::CommandSupportType ext2::m_GetUUID = FileSystem::cmdSupportNone;
|
||||||
|
|
||||||
ext2::ext2(qint64 firstsector, qint64 lastsector, qint64 sectorsused, const QString& label, FileSystem::Type t) :
|
ext2::ext2(qint64 firstsector, qint64 lastsector, qint64 sectorsused, const QString& label, FileSystem::Type t) :
|
||||||
FileSystem(firstsector, lastsector, sectorsused, label, t)
|
FileSystem(firstsector, lastsector, sectorsused, label, t)
|
||||||
|
@ -47,18 +47,18 @@ namespace FS
|
||||||
|
|
||||||
void ext2::init()
|
void ext2::init()
|
||||||
{
|
{
|
||||||
m_GetUsed = findExternal("dumpe2fs") ? SupportExternal : SupportNone;
|
m_GetUsed = findExternal("dumpe2fs") ? cmdSupportFileSystem : cmdSupportNone;
|
||||||
m_GetLabel = SupportInternal;
|
m_GetLabel = cmdSupportCore;
|
||||||
m_SetLabel = findExternal("e2label") ? SupportExternal : SupportNone;
|
m_SetLabel = findExternal("e2label") ? cmdSupportFileSystem : cmdSupportNone;
|
||||||
m_Create = findExternal("mkfs.ext2") ? SupportExternal : SupportNone;
|
m_Create = findExternal("mkfs.ext2") ? cmdSupportFileSystem : cmdSupportNone;
|
||||||
m_Check = findExternal("e2fsck", QStringList() << "-V") ? SupportExternal : SupportNone;
|
m_Check = findExternal("e2fsck", QStringList() << "-V") ? cmdSupportFileSystem : cmdSupportNone;
|
||||||
m_UpdateUUID = findExternal("tune2fs") ? SupportExternal : SupportNone;
|
m_UpdateUUID = findExternal("tune2fs") ? cmdSupportFileSystem : cmdSupportNone;
|
||||||
m_Grow = (m_Check != SupportNone && findExternal("resize2fs")) ? SupportExternal : SupportNone;
|
m_Grow = (m_Check != cmdSupportNone && findExternal("resize2fs")) ? cmdSupportFileSystem : cmdSupportNone;
|
||||||
m_Shrink = m_GetUsed != SupportNone ? SupportExternal : SupportNone;
|
m_Shrink = m_GetUsed != cmdSupportNone ? cmdSupportFileSystem : cmdSupportNone;
|
||||||
m_Copy = (m_Check != SupportNone) ? SupportInternal : SupportNone;
|
m_Copy = (m_Check != cmdSupportNone) ? cmdSupportCore : cmdSupportNone;
|
||||||
m_Move = (m_Check != SupportNone) ? SupportInternal : SupportNone;
|
m_Move = (m_Check != cmdSupportNone) ? cmdSupportCore : cmdSupportNone;
|
||||||
m_Backup = SupportInternal;
|
m_Backup = cmdSupportCore;
|
||||||
m_GetUUID = SupportInternal;
|
m_GetUUID = cmdSupportCore;
|
||||||
}
|
}
|
||||||
|
|
||||||
qint64 ext2::maxCapacity() const
|
qint64 ext2::maxCapacity() const
|
||||||
|
|
|
@ -21,10 +21,10 @@
|
||||||
|
|
||||||
namespace FS
|
namespace FS
|
||||||
{
|
{
|
||||||
FileSystem::CommandSupportType extended::m_Create = FileSystem::SupportExternal;
|
FileSystem::CommandSupportType extended::m_Create = FileSystem::cmdSupportFileSystem;
|
||||||
FileSystem::CommandSupportType extended::m_Grow = FileSystem::SupportInternal;
|
FileSystem::CommandSupportType extended::m_Grow = FileSystem::cmdSupportCore;
|
||||||
FileSystem::CommandSupportType extended::m_Shrink = FileSystem::SupportInternal;
|
FileSystem::CommandSupportType extended::m_Shrink = FileSystem::cmdSupportCore;
|
||||||
FileSystem::CommandSupportType extended::m_Move = FileSystem::SupportInternal;
|
FileSystem::CommandSupportType extended::m_Move = FileSystem::cmdSupportCore;
|
||||||
|
|
||||||
extended::extended(qint64 firstsector, qint64 lastsector, qint64 sectorsused, const QString& label) :
|
extended::extended(qint64 firstsector, qint64 lastsector, qint64 sectorsused, const QString& label) :
|
||||||
FileSystem(firstsector, lastsector, sectorsused, label, FileSystem::Extended)
|
FileSystem(firstsector, lastsector, sectorsused, label, FileSystem::Extended)
|
||||||
|
|
|
@ -36,18 +36,18 @@
|
||||||
|
|
||||||
namespace FS
|
namespace FS
|
||||||
{
|
{
|
||||||
FileSystem::CommandSupportType fat16::m_GetUsed = FileSystem::SupportNone;
|
FileSystem::CommandSupportType fat16::m_GetUsed = FileSystem::cmdSupportNone;
|
||||||
FileSystem::CommandSupportType fat16::m_GetLabel = FileSystem::SupportNone;
|
FileSystem::CommandSupportType fat16::m_GetLabel = FileSystem::cmdSupportNone;
|
||||||
FileSystem::CommandSupportType fat16::m_SetLabel = FileSystem::SupportNone;
|
FileSystem::CommandSupportType fat16::m_SetLabel = FileSystem::cmdSupportNone;
|
||||||
FileSystem::CommandSupportType fat16::m_Create = FileSystem::SupportNone;
|
FileSystem::CommandSupportType fat16::m_Create = FileSystem::cmdSupportNone;
|
||||||
FileSystem::CommandSupportType fat16::m_Grow = FileSystem::SupportNone;
|
FileSystem::CommandSupportType fat16::m_Grow = FileSystem::cmdSupportNone;
|
||||||
FileSystem::CommandSupportType fat16::m_Shrink = FileSystem::SupportNone;
|
FileSystem::CommandSupportType fat16::m_Shrink = FileSystem::cmdSupportNone;
|
||||||
FileSystem::CommandSupportType fat16::m_Move = FileSystem::SupportNone;
|
FileSystem::CommandSupportType fat16::m_Move = FileSystem::cmdSupportNone;
|
||||||
FileSystem::CommandSupportType fat16::m_Check = FileSystem::SupportNone;
|
FileSystem::CommandSupportType fat16::m_Check = FileSystem::cmdSupportNone;
|
||||||
FileSystem::CommandSupportType fat16::m_Copy = FileSystem::SupportNone;
|
FileSystem::CommandSupportType fat16::m_Copy = FileSystem::cmdSupportNone;
|
||||||
FileSystem::CommandSupportType fat16::m_Backup = FileSystem::SupportNone;
|
FileSystem::CommandSupportType fat16::m_Backup = FileSystem::cmdSupportNone;
|
||||||
FileSystem::CommandSupportType fat16::m_UpdateUUID = FileSystem::SupportNone;
|
FileSystem::CommandSupportType fat16::m_UpdateUUID = FileSystem::cmdSupportNone;
|
||||||
FileSystem::CommandSupportType fat16::m_GetUUID = FileSystem::SupportNone;
|
FileSystem::CommandSupportType fat16::m_GetUUID = FileSystem::cmdSupportNone;
|
||||||
|
|
||||||
fat16::fat16(qint64 firstsector, qint64 lastsector, qint64 sectorsused, const QString& label, FileSystem::Type t) :
|
fat16::fat16(qint64 firstsector, qint64 lastsector, qint64 sectorsused, const QString& label, FileSystem::Type t) :
|
||||||
FileSystem(firstsector, lastsector, sectorsused, label, t)
|
FileSystem(firstsector, lastsector, sectorsused, label, t)
|
||||||
|
@ -56,17 +56,17 @@ namespace FS
|
||||||
|
|
||||||
void fat16::init()
|
void fat16::init()
|
||||||
{
|
{
|
||||||
m_Create = findExternal("mkfs.msdos") ? SupportExternal : SupportNone;
|
m_Create = findExternal("mkfs.msdos") ? cmdSupportFileSystem : cmdSupportNone;
|
||||||
m_GetUsed = m_Check = findExternal("fsck.msdos", QStringList(), 2) ? SupportExternal : SupportNone;
|
m_GetUsed = m_Check = findExternal("fsck.msdos", QStringList(), 2) ? cmdSupportFileSystem : cmdSupportNone;
|
||||||
m_GetLabel = SupportInternal;
|
m_GetLabel = cmdSupportCore;
|
||||||
m_SetLabel = SupportExternal;
|
m_SetLabel = cmdSupportFileSystem;
|
||||||
m_Grow = SupportInternal;
|
m_Grow = cmdSupportCore;
|
||||||
m_Shrink = SupportInternal;
|
m_Shrink = cmdSupportCore;
|
||||||
m_Move = SupportInternal;
|
m_Move = cmdSupportCore;
|
||||||
m_Copy = SupportInternal;
|
m_Copy = cmdSupportCore;
|
||||||
m_Backup = SupportInternal;
|
m_Backup = cmdSupportCore;
|
||||||
m_UpdateUUID = findExternal("dd") ? SupportExternal : SupportNone;
|
m_UpdateUUID = findExternal("dd") ? cmdSupportFileSystem : cmdSupportNone;
|
||||||
m_GetUUID = SupportInternal;
|
m_GetUUID = cmdSupportCore;
|
||||||
}
|
}
|
||||||
|
|
||||||
qint64 fat16::minCapacity() const
|
qint64 fat16::minCapacity() const
|
||||||
|
|
|
@ -68,9 +68,9 @@ class FileSystem
|
||||||
/** The type of support for a given FileSystem action */
|
/** The type of support for a given FileSystem action */
|
||||||
enum CommandSupportType
|
enum CommandSupportType
|
||||||
{
|
{
|
||||||
SupportNone = 0, /**< no support */
|
cmdSupportNone = 0, /**< no support */
|
||||||
SupportInternal = 1, /**< internal support */
|
cmdSupportCore = 1, /**< internal support */
|
||||||
SupportExternal = 2 /**< supported by some external command */
|
cmdSupportFileSystem = 2 /**< supported by some external command */
|
||||||
};
|
};
|
||||||
|
|
||||||
Q_DECLARE_FLAGS(CommandSupportTypes, CommandSupportType)
|
Q_DECLARE_FLAGS(CommandSupportTypes, CommandSupportType)
|
||||||
|
@ -94,18 +94,29 @@ class FileSystem
|
||||||
virtual QString readUUID(const QString& deviceNode) const;
|
virtual QString readUUID(const QString& deviceNode) const;
|
||||||
virtual bool updateBootSector(Report& report, 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 supportGetUsed() const { return cmdSupportNone; } /**< @return CommandSupportType for getting used capacity */
|
||||||
virtual CommandSupportType supportGetLabel() const { return SupportNone; } /**< @return CommandSupportType for reading label*/
|
virtual CommandSupportType supportGetLabel() const { return cmdSupportNone
|
||||||
virtual CommandSupportType supportCreate() const { return SupportNone; } /**< @return CommandSupportType for creating */
|
; } /**< @return CommandSupportType for reading label*/
|
||||||
virtual CommandSupportType supportGrow() const { return SupportNone; } /**< @return CommandSupportType for growing */
|
virtual CommandSupportType supportCreate() const { return cmdSupportNone
|
||||||
virtual CommandSupportType supportShrink() const { return SupportNone; } /**< @return CommandSupportType for shrinking */
|
; } /**< @return CommandSupportType for creating */
|
||||||
virtual CommandSupportType supportMove() const { return SupportNone; } /**< @return CommandSupportType for moving */
|
virtual CommandSupportType supportGrow() const { return cmdSupportNone
|
||||||
virtual CommandSupportType supportCheck() const { return SupportNone; } /**< @return CommandSupportType for checking */
|
; } /**< @return CommandSupportType for growing */
|
||||||
virtual CommandSupportType supportCopy() const { return SupportNone; } /**< @return CommandSupportType for copying */
|
virtual CommandSupportType supportShrink() const { return cmdSupportNone
|
||||||
virtual CommandSupportType supportBackup() const { return SupportNone; } /**< @return CommandSupportType for backing up */
|
; } /**< @return CommandSupportType for shrinking */
|
||||||
virtual CommandSupportType supportSetLabel() const { return SupportNone; } /**< @return CommandSupportType for setting label*/
|
virtual CommandSupportType supportMove() const { return cmdSupportNone
|
||||||
virtual CommandSupportType supportUpdateUUID() const { return SupportNone; } /**< @return CommandSupportType for updating the UUID */
|
; } /**< @return CommandSupportType for moving */
|
||||||
virtual CommandSupportType supportGetUUID() const { return SupportNone; } /**< @return CommandSupportType for reading the UUID */
|
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 minCapacity() const;
|
||||||
virtual qint64 maxCapacity() const;
|
virtual qint64 maxCapacity() const;
|
||||||
|
|
|
@ -27,14 +27,14 @@
|
||||||
|
|
||||||
namespace FS
|
namespace FS
|
||||||
{
|
{
|
||||||
FileSystem::CommandSupportType hfs::m_GetUsed = FileSystem::SupportNone;
|
FileSystem::CommandSupportType hfs::m_GetUsed = FileSystem::cmdSupportNone;
|
||||||
FileSystem::CommandSupportType hfs::m_GetLabel = FileSystem::SupportNone;
|
FileSystem::CommandSupportType hfs::m_GetLabel = FileSystem::cmdSupportNone;
|
||||||
FileSystem::CommandSupportType hfs::m_Create = FileSystem::SupportNone;
|
FileSystem::CommandSupportType hfs::m_Create = FileSystem::cmdSupportNone;
|
||||||
FileSystem::CommandSupportType hfs::m_Shrink = FileSystem::SupportNone;
|
FileSystem::CommandSupportType hfs::m_Shrink = FileSystem::cmdSupportNone;
|
||||||
FileSystem::CommandSupportType hfs::m_Move = FileSystem::SupportNone;
|
FileSystem::CommandSupportType hfs::m_Move = FileSystem::cmdSupportNone;
|
||||||
FileSystem::CommandSupportType hfs::m_Check = FileSystem::SupportNone;
|
FileSystem::CommandSupportType hfs::m_Check = FileSystem::cmdSupportNone;
|
||||||
FileSystem::CommandSupportType hfs::m_Copy = FileSystem::SupportNone;
|
FileSystem::CommandSupportType hfs::m_Copy = FileSystem::cmdSupportNone;
|
||||||
FileSystem::CommandSupportType hfs::m_Backup = FileSystem::SupportNone;
|
FileSystem::CommandSupportType hfs::m_Backup = FileSystem::cmdSupportNone;
|
||||||
|
|
||||||
hfs::hfs(qint64 firstsector, qint64 lastsector, qint64 sectorsused, const QString& label) :
|
hfs::hfs(qint64 firstsector, qint64 lastsector, qint64 sectorsused, const QString& label) :
|
||||||
FileSystem(firstsector, lastsector, sectorsused, label, FileSystem::Hfs)
|
FileSystem(firstsector, lastsector, sectorsused, label, FileSystem::Hfs)
|
||||||
|
@ -43,15 +43,15 @@ namespace FS
|
||||||
|
|
||||||
void hfs::init()
|
void hfs::init()
|
||||||
{
|
{
|
||||||
m_GetLabel = SupportInternal;
|
m_GetLabel = cmdSupportCore;
|
||||||
m_Create = findExternal("hformat") ? SupportExternal : SupportNone;
|
m_Create = findExternal("hformat") ? cmdSupportFileSystem : cmdSupportNone;
|
||||||
m_Check = findExternal("hfsck") ? SupportExternal : SupportNone;
|
m_Check = findExternal("hfsck") ? cmdSupportFileSystem : cmdSupportNone;
|
||||||
|
|
||||||
m_GetUsed = SupportInternal;
|
m_GetUsed = cmdSupportCore;
|
||||||
m_Shrink = SupportInternal;
|
m_Shrink = cmdSupportCore;
|
||||||
|
|
||||||
m_Move = m_Copy = (m_Check != SupportNone) ? SupportInternal : SupportNone;
|
m_Move = m_Copy = (m_Check != cmdSupportNone) ? cmdSupportCore : cmdSupportNone;
|
||||||
m_Backup = SupportInternal;
|
m_Backup = cmdSupportCore;
|
||||||
}
|
}
|
||||||
|
|
||||||
qint64 hfs::maxCapacity() const
|
qint64 hfs::maxCapacity() const
|
||||||
|
|
|
@ -26,12 +26,12 @@
|
||||||
|
|
||||||
namespace FS
|
namespace FS
|
||||||
{
|
{
|
||||||
FileSystem::CommandSupportType hfsplus::m_GetUsed = FileSystem::SupportNone;
|
FileSystem::CommandSupportType hfsplus::m_GetUsed = FileSystem::cmdSupportNone;
|
||||||
FileSystem::CommandSupportType hfsplus::m_Shrink = FileSystem::SupportNone;
|
FileSystem::CommandSupportType hfsplus::m_Shrink = FileSystem::cmdSupportNone;
|
||||||
FileSystem::CommandSupportType hfsplus::m_Move = FileSystem::SupportNone;
|
FileSystem::CommandSupportType hfsplus::m_Move = FileSystem::cmdSupportNone;
|
||||||
FileSystem::CommandSupportType hfsplus::m_Check = FileSystem::SupportNone;
|
FileSystem::CommandSupportType hfsplus::m_Check = FileSystem::cmdSupportNone;
|
||||||
FileSystem::CommandSupportType hfsplus::m_Copy = FileSystem::SupportNone;
|
FileSystem::CommandSupportType hfsplus::m_Copy = FileSystem::cmdSupportNone;
|
||||||
FileSystem::CommandSupportType hfsplus::m_Backup = FileSystem::SupportNone;
|
FileSystem::CommandSupportType hfsplus::m_Backup = FileSystem::cmdSupportNone;
|
||||||
|
|
||||||
hfsplus::hfsplus(qint64 firstsector, qint64 lastsector, qint64 sectorsused, const QString& label) :
|
hfsplus::hfsplus(qint64 firstsector, qint64 lastsector, qint64 sectorsused, const QString& label) :
|
||||||
FileSystem(firstsector, lastsector, sectorsused, label, FileSystem::HfsPlus)
|
FileSystem(firstsector, lastsector, sectorsused, label, FileSystem::HfsPlus)
|
||||||
|
@ -40,13 +40,13 @@ namespace FS
|
||||||
|
|
||||||
void hfsplus::init()
|
void hfsplus::init()
|
||||||
{
|
{
|
||||||
m_Check = findExternal("hpfsck") ? SupportExternal : SupportNone;
|
m_Check = findExternal("hpfsck") ? cmdSupportFileSystem : cmdSupportNone;
|
||||||
|
|
||||||
m_GetUsed = SupportInternal;
|
m_GetUsed = cmdSupportCore;
|
||||||
m_Shrink = SupportInternal;
|
m_Shrink = cmdSupportCore;
|
||||||
m_Copy = (m_Check != SupportNone) ? SupportInternal : SupportNone;
|
m_Copy = (m_Check != cmdSupportNone) ? cmdSupportCore : cmdSupportNone;
|
||||||
m_Move = (m_Check != SupportNone) ? SupportInternal : SupportNone;
|
m_Move = (m_Check != cmdSupportNone) ? cmdSupportCore : cmdSupportNone;
|
||||||
m_Backup = SupportInternal;
|
m_Backup = cmdSupportCore;
|
||||||
}
|
}
|
||||||
|
|
||||||
qint64 hfsplus::maxCapacity() const
|
qint64 hfsplus::maxCapacity() const
|
||||||
|
|
|
@ -33,15 +33,15 @@
|
||||||
|
|
||||||
namespace FS
|
namespace FS
|
||||||
{
|
{
|
||||||
FileSystem::CommandSupportType jfs::m_GetUsed = FileSystem::SupportNone;
|
FileSystem::CommandSupportType jfs::m_GetUsed = FileSystem::cmdSupportNone;
|
||||||
FileSystem::CommandSupportType jfs::m_GetLabel = FileSystem::SupportNone;
|
FileSystem::CommandSupportType jfs::m_GetLabel = FileSystem::cmdSupportNone;
|
||||||
FileSystem::CommandSupportType jfs::m_Create = FileSystem::SupportNone;
|
FileSystem::CommandSupportType jfs::m_Create = FileSystem::cmdSupportNone;
|
||||||
FileSystem::CommandSupportType jfs::m_Grow = FileSystem::SupportNone;
|
FileSystem::CommandSupportType jfs::m_Grow = FileSystem::cmdSupportNone;
|
||||||
FileSystem::CommandSupportType jfs::m_Move = FileSystem::SupportNone;
|
FileSystem::CommandSupportType jfs::m_Move = FileSystem::cmdSupportNone;
|
||||||
FileSystem::CommandSupportType jfs::m_Check = FileSystem::SupportNone;
|
FileSystem::CommandSupportType jfs::m_Check = FileSystem::cmdSupportNone;
|
||||||
FileSystem::CommandSupportType jfs::m_Copy = FileSystem::SupportNone;
|
FileSystem::CommandSupportType jfs::m_Copy = FileSystem::cmdSupportNone;
|
||||||
FileSystem::CommandSupportType jfs::m_Backup = FileSystem::SupportNone;
|
FileSystem::CommandSupportType jfs::m_Backup = FileSystem::cmdSupportNone;
|
||||||
FileSystem::CommandSupportType jfs::m_SetLabel = FileSystem::SupportNone;
|
FileSystem::CommandSupportType jfs::m_SetLabel = FileSystem::cmdSupportNone;
|
||||||
|
|
||||||
jfs::jfs(qint64 firstsector, qint64 lastsector, qint64 sectorsused, const QString& label) :
|
jfs::jfs(qint64 firstsector, qint64 lastsector, qint64 sectorsused, const QString& label) :
|
||||||
FileSystem(firstsector, lastsector, sectorsused, label, FileSystem::Jfs)
|
FileSystem(firstsector, lastsector, sectorsused, label, FileSystem::Jfs)
|
||||||
|
@ -50,13 +50,13 @@ namespace FS
|
||||||
|
|
||||||
void jfs::init()
|
void jfs::init()
|
||||||
{
|
{
|
||||||
m_GetUsed = findExternal("jfs_debugfs") ? SupportExternal : SupportNone;
|
m_GetUsed = findExternal("jfs_debugfs") ? cmdSupportFileSystem : cmdSupportNone;
|
||||||
m_GetLabel = SupportInternal;
|
m_GetLabel = cmdSupportCore;
|
||||||
m_SetLabel = findExternal("jfs_tune", QStringList() << "-V") ? SupportExternal : SupportNone;
|
m_SetLabel = findExternal("jfs_tune", QStringList() << "-V") ? cmdSupportFileSystem : cmdSupportNone;
|
||||||
m_Create = findExternal("mkfs.jfs", QStringList() << "-V") ? SupportExternal : SupportNone;
|
m_Create = findExternal("mkfs.jfs", QStringList() << "-V") ? cmdSupportFileSystem : cmdSupportNone;
|
||||||
m_Grow = m_Check = findExternal("fsck.jfs", QStringList() << "-V") ? SupportExternal : SupportNone;
|
m_Grow = m_Check = findExternal("fsck.jfs", QStringList() << "-V") ? cmdSupportFileSystem : cmdSupportNone;
|
||||||
m_Copy = m_Move = (m_Check != SupportNone) ? SupportInternal : SupportNone;
|
m_Copy = m_Move = (m_Check != cmdSupportNone) ? cmdSupportCore : cmdSupportNone;
|
||||||
m_Backup = SupportInternal;
|
m_Backup = cmdSupportCore;
|
||||||
}
|
}
|
||||||
|
|
||||||
qint64 jfs::minCapacity() const
|
qint64 jfs::minCapacity() const
|
||||||
|
|
|
@ -25,14 +25,14 @@
|
||||||
|
|
||||||
namespace FS
|
namespace FS
|
||||||
{
|
{
|
||||||
FileSystem::CommandSupportType linuxswap::m_Create = FileSystem::SupportNone;
|
FileSystem::CommandSupportType linuxswap::m_Create = FileSystem::cmdSupportNone;
|
||||||
FileSystem::CommandSupportType linuxswap::m_Grow = FileSystem::SupportNone;
|
FileSystem::CommandSupportType linuxswap::m_Grow = FileSystem::cmdSupportNone;
|
||||||
FileSystem::CommandSupportType linuxswap::m_Shrink = FileSystem::SupportNone;
|
FileSystem::CommandSupportType linuxswap::m_Shrink = FileSystem::cmdSupportNone;
|
||||||
FileSystem::CommandSupportType linuxswap::m_Move = FileSystem::SupportNone;
|
FileSystem::CommandSupportType linuxswap::m_Move = FileSystem::cmdSupportNone;
|
||||||
FileSystem::CommandSupportType linuxswap::m_Copy = FileSystem::SupportNone;
|
FileSystem::CommandSupportType linuxswap::m_Copy = FileSystem::cmdSupportNone;
|
||||||
FileSystem::CommandSupportType linuxswap::m_GetLabel = FileSystem::SupportNone;
|
FileSystem::CommandSupportType linuxswap::m_GetLabel = FileSystem::cmdSupportNone;
|
||||||
FileSystem::CommandSupportType linuxswap::m_SetLabel = FileSystem::SupportNone;
|
FileSystem::CommandSupportType linuxswap::m_SetLabel = FileSystem::cmdSupportNone;
|
||||||
FileSystem::CommandSupportType linuxswap::m_GetUUID = FileSystem::SupportNone;
|
FileSystem::CommandSupportType linuxswap::m_GetUUID = FileSystem::cmdSupportNone;
|
||||||
|
|
||||||
linuxswap::linuxswap(qint64 firstsector, qint64 lastsector, qint64 sectorsused, const QString& label) :
|
linuxswap::linuxswap(qint64 firstsector, qint64 lastsector, qint64 sectorsused, const QString& label) :
|
||||||
FileSystem(firstsector, lastsector, sectorsused, label, FileSystem::LinuxSwap)
|
FileSystem(firstsector, lastsector, sectorsused, label, FileSystem::LinuxSwap)
|
||||||
|
@ -41,11 +41,11 @@ namespace FS
|
||||||
|
|
||||||
void linuxswap::init()
|
void linuxswap::init()
|
||||||
{
|
{
|
||||||
m_SetLabel = m_Shrink = m_Grow = m_Create = (findExternal("mkswap")) ? SupportExternal : SupportNone;
|
m_SetLabel = m_Shrink = m_Grow = m_Create = (findExternal("mkswap")) ? cmdSupportFileSystem : cmdSupportNone;
|
||||||
m_GetLabel = SupportInternal;
|
m_GetLabel = cmdSupportCore;
|
||||||
m_Copy = SupportInternal;
|
m_Copy = cmdSupportCore;
|
||||||
m_Move = SupportInternal;
|
m_Move = cmdSupportCore;
|
||||||
m_GetUUID = SupportInternal;
|
m_GetUUID = cmdSupportCore;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool linuxswap::create(Report& report, const QString& deviceNode) const
|
bool linuxswap::create(Report& report, const QString& deviceNode) const
|
||||||
|
|
|
@ -37,18 +37,18 @@
|
||||||
|
|
||||||
namespace FS
|
namespace FS
|
||||||
{
|
{
|
||||||
FileSystem::CommandSupportType ntfs::m_GetUsed = FileSystem::SupportNone;
|
FileSystem::CommandSupportType ntfs::m_GetUsed = FileSystem::cmdSupportNone;
|
||||||
FileSystem::CommandSupportType ntfs::m_GetLabel = FileSystem::SupportNone;
|
FileSystem::CommandSupportType ntfs::m_GetLabel = FileSystem::cmdSupportNone;
|
||||||
FileSystem::CommandSupportType ntfs::m_Create = FileSystem::SupportNone;
|
FileSystem::CommandSupportType ntfs::m_Create = FileSystem::cmdSupportNone;
|
||||||
FileSystem::CommandSupportType ntfs::m_Grow = FileSystem::SupportNone;
|
FileSystem::CommandSupportType ntfs::m_Grow = FileSystem::cmdSupportNone;
|
||||||
FileSystem::CommandSupportType ntfs::m_Shrink = FileSystem::SupportNone;
|
FileSystem::CommandSupportType ntfs::m_Shrink = FileSystem::cmdSupportNone;
|
||||||
FileSystem::CommandSupportType ntfs::m_Move = FileSystem::SupportNone;
|
FileSystem::CommandSupportType ntfs::m_Move = FileSystem::cmdSupportNone;
|
||||||
FileSystem::CommandSupportType ntfs::m_Check = FileSystem::SupportNone;
|
FileSystem::CommandSupportType ntfs::m_Check = FileSystem::cmdSupportNone;
|
||||||
FileSystem::CommandSupportType ntfs::m_Copy = FileSystem::SupportNone;
|
FileSystem::CommandSupportType ntfs::m_Copy = FileSystem::cmdSupportNone;
|
||||||
FileSystem::CommandSupportType ntfs::m_Backup = FileSystem::SupportNone;
|
FileSystem::CommandSupportType ntfs::m_Backup = FileSystem::cmdSupportNone;
|
||||||
FileSystem::CommandSupportType ntfs::m_SetLabel = FileSystem::SupportNone;
|
FileSystem::CommandSupportType ntfs::m_SetLabel = FileSystem::cmdSupportNone;
|
||||||
FileSystem::CommandSupportType ntfs::m_UpdateUUID = FileSystem::SupportNone;
|
FileSystem::CommandSupportType ntfs::m_UpdateUUID = FileSystem::cmdSupportNone;
|
||||||
FileSystem::CommandSupportType ntfs::m_GetUUID = FileSystem::SupportNone;
|
FileSystem::CommandSupportType ntfs::m_GetUUID = FileSystem::cmdSupportNone;
|
||||||
|
|
||||||
ntfs::ntfs(qint64 firstsector, qint64 lastsector, qint64 sectorsused, const QString& label) :
|
ntfs::ntfs(qint64 firstsector, qint64 lastsector, qint64 sectorsused, const QString& label) :
|
||||||
FileSystem(firstsector, lastsector, sectorsused, label, FileSystem::Ntfs)
|
FileSystem(firstsector, lastsector, sectorsused, label, FileSystem::Ntfs)
|
||||||
|
@ -57,15 +57,15 @@ namespace FS
|
||||||
|
|
||||||
void ntfs::init()
|
void ntfs::init()
|
||||||
{
|
{
|
||||||
m_Shrink = m_Grow = m_Check = m_GetUsed = findExternal("ntfsresize") ? SupportExternal : SupportNone;
|
m_Shrink = m_Grow = m_Check = m_GetUsed = findExternal("ntfsresize") ? cmdSupportFileSystem : cmdSupportNone;
|
||||||
m_GetLabel = SupportInternal;
|
m_GetLabel = cmdSupportCore;
|
||||||
m_SetLabel = findExternal("ntfslabel") ? SupportExternal : SupportNone;
|
m_SetLabel = findExternal("ntfslabel") ? cmdSupportFileSystem : cmdSupportNone;
|
||||||
m_Create = findExternal("mkfs.ntfs") ? SupportExternal : SupportNone;
|
m_Create = findExternal("mkfs.ntfs") ? cmdSupportFileSystem : cmdSupportNone;
|
||||||
m_Copy = findExternal("ntfsclone") ? SupportExternal : SupportNone;
|
m_Copy = findExternal("ntfsclone") ? cmdSupportFileSystem : cmdSupportNone;
|
||||||
m_Backup = SupportInternal;
|
m_Backup = cmdSupportCore;
|
||||||
m_UpdateUUID = findExternal("dd") ? SupportExternal : SupportNone;
|
m_UpdateUUID = findExternal("dd") ? cmdSupportFileSystem : cmdSupportNone;
|
||||||
m_Move = (m_Check != SupportNone) ? SupportInternal : SupportNone;
|
m_Move = (m_Check != cmdSupportNone) ? cmdSupportCore : cmdSupportNone;
|
||||||
m_GetUUID = SupportInternal;
|
m_GetUUID = cmdSupportCore;
|
||||||
}
|
}
|
||||||
|
|
||||||
qint64 ntfs::maxCapacity() const
|
qint64 ntfs::maxCapacity() const
|
||||||
|
|
|
@ -26,13 +26,13 @@
|
||||||
|
|
||||||
namespace FS
|
namespace FS
|
||||||
{
|
{
|
||||||
FileSystem::CommandSupportType reiser4::m_GetUsed = FileSystem::SupportNone;
|
FileSystem::CommandSupportType reiser4::m_GetUsed = FileSystem::cmdSupportNone;
|
||||||
FileSystem::CommandSupportType reiser4::m_GetLabel = FileSystem::SupportNone;
|
FileSystem::CommandSupportType reiser4::m_GetLabel = FileSystem::cmdSupportNone;
|
||||||
FileSystem::CommandSupportType reiser4::m_Create = FileSystem::SupportNone;
|
FileSystem::CommandSupportType reiser4::m_Create = FileSystem::cmdSupportNone;
|
||||||
FileSystem::CommandSupportType reiser4::m_Move = FileSystem::SupportNone;
|
FileSystem::CommandSupportType reiser4::m_Move = FileSystem::cmdSupportNone;
|
||||||
FileSystem::CommandSupportType reiser4::m_Check = FileSystem::SupportNone;
|
FileSystem::CommandSupportType reiser4::m_Check = FileSystem::cmdSupportNone;
|
||||||
FileSystem::CommandSupportType reiser4::m_Copy = FileSystem::SupportNone;
|
FileSystem::CommandSupportType reiser4::m_Copy = FileSystem::cmdSupportNone;
|
||||||
FileSystem::CommandSupportType reiser4::m_Backup = FileSystem::SupportNone;
|
FileSystem::CommandSupportType reiser4::m_Backup = FileSystem::cmdSupportNone;
|
||||||
|
|
||||||
reiser4::reiser4(qint64 firstsector, qint64 lastsector, qint64 sectorsused, const QString& label) :
|
reiser4::reiser4(qint64 firstsector, qint64 lastsector, qint64 sectorsused, const QString& label) :
|
||||||
FileSystem(firstsector, lastsector, sectorsused, label, FileSystem::Reiser4)
|
FileSystem(firstsector, lastsector, sectorsused, label, FileSystem::Reiser4)
|
||||||
|
@ -41,12 +41,12 @@ namespace FS
|
||||||
|
|
||||||
void reiser4::init()
|
void reiser4::init()
|
||||||
{
|
{
|
||||||
m_GetLabel = SupportInternal;
|
m_GetLabel = cmdSupportCore;
|
||||||
m_GetUsed = findExternal("debugfs.reiser4", QStringList(), 16) ? SupportExternal : SupportNone;
|
m_GetUsed = findExternal("debugfs.reiser4", QStringList(), 16) ? cmdSupportFileSystem : cmdSupportNone;
|
||||||
m_Create = findExternal("mkfs.reiser4", QStringList(), 16) ? SupportExternal : SupportNone;
|
m_Create = findExternal("mkfs.reiser4", QStringList(), 16) ? cmdSupportFileSystem : cmdSupportNone;
|
||||||
m_Check = findExternal("fsck.reiser4", QStringList(), 16) ? SupportExternal : SupportNone;
|
m_Check = findExternal("fsck.reiser4", QStringList(), 16) ? cmdSupportFileSystem : cmdSupportNone;
|
||||||
m_Move = m_Copy = (m_Check != SupportNone) ? SupportInternal : SupportNone;
|
m_Move = m_Copy = (m_Check != cmdSupportNone) ? cmdSupportCore : cmdSupportNone;
|
||||||
m_Backup = SupportInternal;
|
m_Backup = cmdSupportCore;
|
||||||
}
|
}
|
||||||
|
|
||||||
qint64 reiser4::readUsedCapacity(const QString& deviceNode) const
|
qint64 reiser4::readUsedCapacity(const QString& deviceNode) const
|
||||||
|
|
|
@ -29,18 +29,18 @@
|
||||||
|
|
||||||
namespace FS
|
namespace FS
|
||||||
{
|
{
|
||||||
FileSystem::CommandSupportType reiserfs::m_GetUsed = FileSystem::SupportNone;
|
FileSystem::CommandSupportType reiserfs::m_GetUsed = FileSystem::cmdSupportNone;
|
||||||
FileSystem::CommandSupportType reiserfs::m_GetLabel = FileSystem::SupportNone;
|
FileSystem::CommandSupportType reiserfs::m_GetLabel = FileSystem::cmdSupportNone;
|
||||||
FileSystem::CommandSupportType reiserfs::m_Create = FileSystem::SupportNone;
|
FileSystem::CommandSupportType reiserfs::m_Create = FileSystem::cmdSupportNone;
|
||||||
FileSystem::CommandSupportType reiserfs::m_Grow = FileSystem::SupportNone;
|
FileSystem::CommandSupportType reiserfs::m_Grow = FileSystem::cmdSupportNone;
|
||||||
FileSystem::CommandSupportType reiserfs::m_Shrink = FileSystem::SupportNone;
|
FileSystem::CommandSupportType reiserfs::m_Shrink = FileSystem::cmdSupportNone;
|
||||||
FileSystem::CommandSupportType reiserfs::m_Move = FileSystem::SupportNone;
|
FileSystem::CommandSupportType reiserfs::m_Move = FileSystem::cmdSupportNone;
|
||||||
FileSystem::CommandSupportType reiserfs::m_Check = FileSystem::SupportNone;
|
FileSystem::CommandSupportType reiserfs::m_Check = FileSystem::cmdSupportNone;
|
||||||
FileSystem::CommandSupportType reiserfs::m_Copy = FileSystem::SupportNone;
|
FileSystem::CommandSupportType reiserfs::m_Copy = FileSystem::cmdSupportNone;
|
||||||
FileSystem::CommandSupportType reiserfs::m_Backup = FileSystem::SupportNone;
|
FileSystem::CommandSupportType reiserfs::m_Backup = FileSystem::cmdSupportNone;
|
||||||
FileSystem::CommandSupportType reiserfs::m_SetLabel = FileSystem::SupportNone;
|
FileSystem::CommandSupportType reiserfs::m_SetLabel = FileSystem::cmdSupportNone;
|
||||||
FileSystem::CommandSupportType reiserfs::m_UpdateUUID = FileSystem::SupportNone;
|
FileSystem::CommandSupportType reiserfs::m_UpdateUUID = FileSystem::cmdSupportNone;
|
||||||
FileSystem::CommandSupportType reiserfs::m_GetUUID = FileSystem::SupportNone;
|
FileSystem::CommandSupportType reiserfs::m_GetUUID = FileSystem::cmdSupportNone;
|
||||||
|
|
||||||
reiserfs::reiserfs(qint64 firstsector, qint64 lastsector, qint64 sectorsused, const QString& label) :
|
reiserfs::reiserfs(qint64 firstsector, qint64 lastsector, qint64 sectorsused, const QString& label) :
|
||||||
FileSystem(firstsector, lastsector, sectorsused, label, FileSystem::ReiserFS)
|
FileSystem(firstsector, lastsector, sectorsused, label, FileSystem::ReiserFS)
|
||||||
|
@ -49,17 +49,17 @@ namespace FS
|
||||||
|
|
||||||
void reiserfs::init()
|
void reiserfs::init()
|
||||||
{
|
{
|
||||||
m_GetLabel = SupportInternal;
|
m_GetLabel = cmdSupportCore;
|
||||||
m_GetUsed = findExternal("debugreiserfs", QStringList(), 16) ? SupportExternal : SupportNone;
|
m_GetUsed = findExternal("debugreiserfs", QStringList(), 16) ? cmdSupportFileSystem : cmdSupportNone;
|
||||||
m_SetLabel = findExternal("reiserfstune") ? SupportExternal : SupportNone;
|
m_SetLabel = findExternal("reiserfstune") ? cmdSupportFileSystem : cmdSupportNone;
|
||||||
m_Create = findExternal("mkfs.reiserfs") ? SupportExternal : SupportNone;
|
m_Create = findExternal("mkfs.reiserfs") ? cmdSupportFileSystem : cmdSupportNone;
|
||||||
m_Check = findExternal("fsck.reiserfs") ? SupportExternal : SupportNone;
|
m_Check = findExternal("fsck.reiserfs") ? cmdSupportFileSystem : cmdSupportNone;
|
||||||
m_Move = m_Copy = (m_Check != SupportNone) ? SupportInternal : SupportNone;
|
m_Move = m_Copy = (m_Check != cmdSupportNone) ? cmdSupportCore : cmdSupportNone;
|
||||||
m_Grow = findExternal("resize_reiserfs", QStringList(), 16) ? SupportExternal : SupportNone;
|
m_Grow = findExternal("resize_reiserfs", QStringList(), 16) ? cmdSupportFileSystem : cmdSupportNone;
|
||||||
m_Shrink = (m_GetUsed != SupportNone && m_Grow != SupportNone) ? SupportExternal : SupportNone;
|
m_Shrink = (m_GetUsed != cmdSupportNone && m_Grow != cmdSupportNone) ? cmdSupportFileSystem : cmdSupportNone;
|
||||||
m_Backup = SupportInternal;
|
m_Backup = cmdSupportCore;
|
||||||
m_UpdateUUID = findExternal("reiserfstune") ? SupportExternal : SupportNone;
|
m_UpdateUUID = findExternal("reiserfstune") ? cmdSupportFileSystem : cmdSupportNone;
|
||||||
m_GetUUID = SupportInternal;
|
m_GetUUID = cmdSupportCore;
|
||||||
}
|
}
|
||||||
|
|
||||||
qint64 reiserfs::minCapacity() const
|
qint64 reiserfs::minCapacity() const
|
||||||
|
|
|
@ -21,9 +21,9 @@
|
||||||
|
|
||||||
namespace FS
|
namespace FS
|
||||||
{
|
{
|
||||||
FileSystem::CommandSupportType ufs::m_Move = FileSystem::SupportInternal;
|
FileSystem::CommandSupportType ufs::m_Move = FileSystem::cmdSupportCore;
|
||||||
FileSystem::CommandSupportType ufs::m_Copy = FileSystem::SupportInternal;
|
FileSystem::CommandSupportType ufs::m_Copy = FileSystem::cmdSupportCore;
|
||||||
FileSystem::CommandSupportType ufs::m_Backup = FileSystem::SupportInternal;
|
FileSystem::CommandSupportType ufs::m_Backup = FileSystem::cmdSupportCore;
|
||||||
|
|
||||||
ufs::ufs(qint64 firstsector, qint64 lastsector, qint64 sectorsused, const QString& label) :
|
ufs::ufs(qint64 firstsector, qint64 lastsector, qint64 sectorsused, const QString& label) :
|
||||||
FileSystem(firstsector, lastsector, sectorsused, label, FileSystem::Ufs)
|
FileSystem(firstsector, lastsector, sectorsused, label, FileSystem::Ufs)
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
|
|
||||||
namespace FS
|
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) :
|
unformatted::unformatted(qint64 firstsector, qint64 lastsector, qint64 sectorsused, const QString& label) :
|
||||||
FileSystem(firstsector, lastsector, sectorsused, label, FileSystem::Unformatted)
|
FileSystem(firstsector, lastsector, sectorsused, label, FileSystem::Unformatted)
|
||||||
|
|
|
@ -34,15 +34,15 @@
|
||||||
|
|
||||||
namespace FS
|
namespace FS
|
||||||
{
|
{
|
||||||
FileSystem::CommandSupportType xfs::m_GetUsed = FileSystem::SupportNone;
|
FileSystem::CommandSupportType xfs::m_GetUsed = FileSystem::cmdSupportNone;
|
||||||
FileSystem::CommandSupportType xfs::m_GetLabel = FileSystem::SupportNone;
|
FileSystem::CommandSupportType xfs::m_GetLabel = FileSystem::cmdSupportNone;
|
||||||
FileSystem::CommandSupportType xfs::m_Create = FileSystem::SupportNone;
|
FileSystem::CommandSupportType xfs::m_Create = FileSystem::cmdSupportNone;
|
||||||
FileSystem::CommandSupportType xfs::m_Grow = FileSystem::SupportNone;
|
FileSystem::CommandSupportType xfs::m_Grow = FileSystem::cmdSupportNone;
|
||||||
FileSystem::CommandSupportType xfs::m_Move = FileSystem::SupportNone;
|
FileSystem::CommandSupportType xfs::m_Move = FileSystem::cmdSupportNone;
|
||||||
FileSystem::CommandSupportType xfs::m_Check = FileSystem::SupportNone;
|
FileSystem::CommandSupportType xfs::m_Check = FileSystem::cmdSupportNone;
|
||||||
FileSystem::CommandSupportType xfs::m_Copy = FileSystem::SupportNone;
|
FileSystem::CommandSupportType xfs::m_Copy = FileSystem::cmdSupportNone;
|
||||||
FileSystem::CommandSupportType xfs::m_Backup = FileSystem::SupportNone;
|
FileSystem::CommandSupportType xfs::m_Backup = FileSystem::cmdSupportNone;
|
||||||
FileSystem::CommandSupportType xfs::m_SetLabel = FileSystem::SupportNone;
|
FileSystem::CommandSupportType xfs::m_SetLabel = FileSystem::cmdSupportNone;
|
||||||
|
|
||||||
xfs::xfs(qint64 firstsector, qint64 lastsector, qint64 sectorsused, const QString& label) :
|
xfs::xfs(qint64 firstsector, qint64 lastsector, qint64 sectorsused, const QString& label) :
|
||||||
FileSystem(firstsector, lastsector, sectorsused, label, FileSystem::Xfs)
|
FileSystem(firstsector, lastsector, sectorsused, label, FileSystem::Xfs)
|
||||||
|
@ -51,15 +51,15 @@ namespace FS
|
||||||
|
|
||||||
void xfs::init()
|
void xfs::init()
|
||||||
{
|
{
|
||||||
m_GetLabel = SupportInternal;
|
m_GetLabel = cmdSupportCore;
|
||||||
m_SetLabel = m_GetUsed = findExternal("xfs_db") ? SupportExternal : SupportNone;
|
m_SetLabel = m_GetUsed = findExternal("xfs_db") ? cmdSupportFileSystem : cmdSupportNone;
|
||||||
m_Create = findExternal("mkfs.xfs") ? SupportExternal : SupportNone;
|
m_Create = findExternal("mkfs.xfs") ? cmdSupportFileSystem : cmdSupportNone;
|
||||||
|
|
||||||
m_Check = findExternal("xfs_repair") ? SupportExternal : SupportNone;
|
m_Check = findExternal("xfs_repair") ? cmdSupportFileSystem : cmdSupportNone;
|
||||||
m_Grow = (findExternal("xfs_growfs", QStringList() << "-V") && m_Check != SupportNone) ? SupportExternal : SupportNone;
|
m_Grow = (findExternal("xfs_growfs", QStringList() << "-V") && m_Check != cmdSupportNone) ? cmdSupportFileSystem : cmdSupportNone;
|
||||||
m_Copy = findExternal("xfs_copy") ? SupportExternal : SupportNone;
|
m_Copy = findExternal("xfs_copy") ? cmdSupportFileSystem : cmdSupportNone;
|
||||||
m_Move = (m_Check != SupportNone) ? SupportInternal : SupportNone;
|
m_Move = (m_Check != cmdSupportNone) ? cmdSupportCore : cmdSupportNone;
|
||||||
m_Backup = SupportInternal;
|
m_Backup = cmdSupportCore;
|
||||||
}
|
}
|
||||||
|
|
||||||
qint64 xfs::minCapacity() const
|
qint64 xfs::minCapacity() const
|
||||||
|
|
|
@ -63,7 +63,7 @@ void NewDialog::setupDialog()
|
||||||
{
|
{
|
||||||
QStringList fsNames;
|
QStringList fsNames;
|
||||||
foreach (const FileSystem* fs, FileSystemFactory::map())
|
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());
|
fsNames.append(fs->name());
|
||||||
|
|
||||||
qSort(fsNames.begin(), fsNames.end(), caseInsensitiveLessThan);
|
qSort(fsNames.begin(), fsNames.end(), caseInsensitiveLessThan);
|
||||||
|
@ -149,7 +149,7 @@ void NewDialog::onLabelChanged(const QString& newLabel)
|
||||||
void NewDialog::updateHideAndShow()
|
void NewDialog::updateHideAndShow()
|
||||||
{
|
{
|
||||||
// this is mostly copy'n'pasted from PartPropsDialog::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().label().setReadOnly(true);
|
||||||
dialogWidget().noSetLabel().setVisible(true);
|
dialogWidget().noSetLabel().setVisible(true);
|
||||||
|
|
|
@ -169,7 +169,7 @@ void PartPropsDialog::updateHideAndShow()
|
||||||
// create a temporary fs for some checks
|
// create a temporary fs for some checks
|
||||||
const FileSystem* fs = FileSystemFactory::create(newFileSystemType(), -1, -1, -1, "");
|
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().label().setReadOnly(true);
|
||||||
dialogWidget().noSetLabel().setVisible(true);
|
dialogWidget().noSetLabel().setVisible(true);
|
||||||
|
@ -190,7 +190,7 @@ void PartPropsDialog::updateHideAndShow()
|
||||||
// when do we show the uuid?
|
// when do we show the uuid?
|
||||||
const bool showUuid =
|
const bool showUuid =
|
||||||
partition().state() != Partition::StateNew && // not for new partitions
|
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);
|
dialogWidget().showUuid(showUuid);
|
||||||
|
|
||||||
|
@ -216,7 +216,7 @@ void PartPropsDialog::updateHideAndShow()
|
||||||
// when do we show the recreate file system check box?
|
// when do we show the recreate file system check box?
|
||||||
const bool showCheckRecreate =
|
const bool showCheckRecreate =
|
||||||
showFileSystem && // only if we also show the file system
|
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().fileSystem().type() != FileSystem::Unknown && // and not for unknown file systems
|
||||||
partition().state() != Partition::StateNew; // or new partitions
|
partition().state() != Partition::StateNew; // or new partitions
|
||||||
|
|
||||||
|
@ -263,7 +263,7 @@ void PartPropsDialog::setupFileSystemComboBox()
|
||||||
QStringList fsNames;
|
QStringList fsNames;
|
||||||
|
|
||||||
foreach(const FileSystem* fs, FileSystemFactory::map())
|
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();
|
QString name = fs->name();
|
||||||
|
|
||||||
|
|
|
@ -54,9 +54,9 @@ bool BackupFileSystemJob::run(Report& parent)
|
||||||
|
|
||||||
Report* report = jobStarted(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());
|
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());
|
CopySourceDevice copySource(sourceDevice(), sourcePartition().fileSystem().firstSector(), sourcePartition().fileSystem().lastSector());
|
||||||
CopyTargetFile copyTarget(fileName(), sourceDevice().sectorSize());
|
CopyTargetFile copyTarget(fileName(), sourceDevice().sectorSize());
|
||||||
|
|
|
@ -43,7 +43,7 @@ bool CheckFileSystemJob::run(Report& parent)
|
||||||
// if we cannot check, assume everything is fine
|
// if we cannot check, assume everything is fine
|
||||||
bool rval = true;
|
bool rval = true;
|
||||||
|
|
||||||
if (partition().fileSystem().supportCheck() == FileSystem::SupportExternal)
|
if (partition().fileSystem().supportCheck() == FileSystem::cmdSupportFileSystem)
|
||||||
rval = partition().fileSystem().check(*report, partition().deviceNode());
|
rval = partition().fileSystem().check(*report, partition().deviceNode());
|
||||||
|
|
||||||
jobFinished(*report, rval);
|
jobFinished(*report, rval);
|
||||||
|
|
|
@ -59,9 +59,9 @@ bool CopyFileSystemJob::run(Report& parent)
|
||||||
|
|
||||||
if (targetPartition().fileSystem().length() < sourcePartition().fileSystem().length())
|
if (targetPartition().fileSystem().length() < sourcePartition().fileSystem().length())
|
||||||
report->line() << i18nc("@info/plain", "Cannot copy file system: File system on target partition <filename>%1</filename> is smaller than the file system on source partition <filename>%2</filename>.", targetPartition().deviceNode(), sourcePartition().deviceNode());
|
report->line() << i18nc("@info/plain", "Cannot copy file system: File system on target partition <filename>%1</filename> is smaller than the file system on source partition <filename>%2</filename>.", 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());
|
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());
|
CopySourceDevice copySource(sourceDevice(), sourcePartition().fileSystem().firstSector(), sourcePartition().fileSystem().lastSector());
|
||||||
CopyTargetDevice copyTarget(targetDevice(), targetPartition().fileSystem().firstSector(), targetPartition().fileSystem().lastSector());
|
CopyTargetDevice copyTarget(targetDevice(), targetPartition().fileSystem().firstSector(), targetPartition().fileSystem().lastSector());
|
||||||
|
@ -85,7 +85,7 @@ bool CopyFileSystemJob::run(Report& parent)
|
||||||
targetPartition().fileSystem().setLastSector(newLastSector);
|
targetPartition().fileSystem().setLastSector(newLastSector);
|
||||||
|
|
||||||
// and set a new UUID, if the target filesystem supports UUIDs
|
// 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().updateUUID(*report, targetPartition().deviceNode());
|
||||||
targetPartition().fileSystem().setUUID(targetPartition().fileSystem().readUUID(targetPartition().deviceNode()));
|
targetPartition().fileSystem().setUUID(targetPartition().fileSystem().readUUID(targetPartition().deviceNode()));
|
||||||
|
|
|
@ -42,7 +42,7 @@ bool CreateFileSystemJob::run(Report& parent)
|
||||||
|
|
||||||
Report* report = jobStarted(parent);
|
Report* report = jobStarted(parent);
|
||||||
|
|
||||||
if (partition().fileSystem().supportCreate() == FileSystem::SupportExternal)
|
if (partition().fileSystem().supportCreate() == FileSystem::cmdSupportFileSystem)
|
||||||
rval = partition().fileSystem().create(*report, partition().deviceNode());
|
rval = partition().fileSystem().create(*report, partition().deviceNode());
|
||||||
|
|
||||||
jobFinished(*report, rval);
|
jobFinished(*report, rval);
|
||||||
|
|
|
@ -80,7 +80,7 @@ bool ResizeFileSystemJob::run(Report& parent)
|
||||||
|
|
||||||
switch(support)
|
switch(support)
|
||||||
{
|
{
|
||||||
case FileSystem::SupportInternal:
|
case FileSystem::cmdSupportCore:
|
||||||
{
|
{
|
||||||
Report* childReport = report->newChild();
|
Report* childReport = report->newChild();
|
||||||
childReport->line() << i18nc("@info/plain", "Resizing a %1 file system using LibParted internal functions.", partition().fileSystem().name());
|
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;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case FileSystem::SupportExternal:
|
case FileSystem::cmdSupportFileSystem:
|
||||||
{
|
{
|
||||||
const qint64 newLengthInByte = Capacity(newLength() * partition().sectorSize()).toInt(Capacity::Byte);
|
const qint64 newLengthInByte = Capacity(newLength() * partition().sectorSize()).toInt(Capacity::Byte);
|
||||||
rval = partition().fileSystem().resize(*report, partition().deviceNode(), newLengthInByte);
|
rval = partition().fileSystem().resize(*report, partition().deviceNode(), newLengthInByte);
|
||||||
|
|
|
@ -47,9 +47,9 @@ bool SetFileSystemLabelJob::run(Report& parent)
|
||||||
// If there's no support for file system label setting for this file system,
|
// 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
|
// 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.
|
// 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 <filename>%1</filename> does not support setting labels. Job ignored.", partition().deviceNode());
|
report->line() << i18nc("@info/plain", "File system on partition <filename>%1</filename> 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());
|
rval = partition().fileSystem().writeLabel(*report, partition().deviceNode(), label());
|
||||||
|
|
||||||
|
|
|
@ -65,6 +65,6 @@ bool BackupOperation::canBackup(const Partition* p)
|
||||||
if (p->state() == Partition::StateNew || p->state() == Partition::StateCopy || p->state() == Partition::StateRestore)
|
if (p->state() == Partition::StateNew || p->state() == Partition::StateCopy || p->state() == Partition::StateRestore)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return p->fileSystem().supportBackup() != FileSystem::SupportNone;
|
return p->fileSystem().supportBackup() != FileSystem::cmdSupportNone;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -63,6 +63,6 @@ bool CheckOperation::canCheck(const Partition* p)
|
||||||
if (p->isMounted())
|
if (p->isMounted())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return p->fileSystem().supportCheck() != FileSystem::SupportNone;
|
return p->fileSystem().supportCheck() != FileSystem::cmdSupportNone;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -293,7 +293,7 @@ bool CopyOperation::canCopy(const Partition* p)
|
||||||
// be forbidden here. The operation stack, however, will take care of these
|
// be forbidden here. The operation stack, however, will take care of these
|
||||||
// problematic cases when pushing the CopyOperation onto the stack.
|
// 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?
|
/** Can a Partition be pasted on another one?
|
||||||
|
|
|
@ -339,7 +339,7 @@ bool ResizeOperation::canGrow(const Partition* p)
|
||||||
if (p->isMounted())
|
if (p->isMounted())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return p->fileSystem().supportGrow() != FileSystem::SupportNone;
|
return p->fileSystem().supportGrow() != FileSystem::cmdSupportNone;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Can a Partition be shrunk, i.e. decreased in size?
|
/** Can a Partition be shrunk, i.e. decreased in size?
|
||||||
|
@ -361,7 +361,7 @@ bool ResizeOperation::canShrink(const Partition* p)
|
||||||
if (p->isMounted())
|
if (p->isMounted())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return p->fileSystem().supportShrink() != FileSystem::SupportNone;
|
return p->fileSystem().supportShrink() != FileSystem::cmdSupportNone;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Can a Partition be moved?
|
/** Can a Partition be moved?
|
||||||
|
@ -384,5 +384,5 @@ bool ResizeOperation::canMove(const Partition* p)
|
||||||
if (p->roles().has(PartitionRole::Extended) && p->hasChildren())
|
if (p->roles().has(PartitionRole::Extended) && p->hasChildren())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return p->fileSystem().supportMove() != FileSystem::SupportNone;
|
return p->fileSystem().supportMove() != FileSystem::cmdSupportNone;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue