Correct some partition size limits.
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1327833
This commit is contained in:
parent
f214724547
commit
b950141986
|
@ -97,7 +97,7 @@ namespace FS
|
|||
|
||||
qint64 btrfs::maxCapacity() const
|
||||
{
|
||||
return Capacity::unitFactor(Capacity::Byte, Capacity::EiB);
|
||||
return 16 * Capacity::unitFactor(Capacity::Byte, Capacity::EiB);
|
||||
}
|
||||
|
||||
qint64 btrfs::readUsedCapacity(const QString& deviceNode) const
|
||||
|
|
|
@ -86,7 +86,7 @@ namespace FS
|
|||
|
||||
qint64 exfat::maxCapacity() const
|
||||
{
|
||||
return Capacity::unitFactor(Capacity::Byte, Capacity::EiB);
|
||||
return 64 * Capacity::unitFactor(Capacity::Byte, Capacity::ZiB);
|
||||
}
|
||||
|
||||
bool exfat::check(Report& report, const QString& deviceNode) const
|
||||
|
|
|
@ -85,7 +85,7 @@ namespace FS
|
|||
|
||||
qint64 ext2::maxCapacity() const
|
||||
{
|
||||
return Capacity::unitFactor(Capacity::Byte, Capacity::EiB);
|
||||
return 32 * Capacity::unitFactor(Capacity::Byte, Capacity::TiB);
|
||||
}
|
||||
|
||||
qint64 ext2::readUsedCapacity(const QString& deviceNode) const
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
#include "fs/ext3.h"
|
||||
|
||||
#include "util/externalcommand.h"
|
||||
#include "util/capacity.h"
|
||||
|
||||
#include <QStringList>
|
||||
|
||||
|
@ -30,6 +31,11 @@ namespace FS
|
|||
{
|
||||
}
|
||||
|
||||
qint64 ext3::maxCapacity() const
|
||||
{
|
||||
return 32 * Capacity::unitFactor(Capacity::Byte, Capacity::TiB);
|
||||
}
|
||||
|
||||
bool ext3::create(Report& report, const QString& deviceNode) const
|
||||
{
|
||||
ExternalCommand cmd(report, "mkfs.ext3", QStringList() << "-q" << deviceNode);
|
||||
|
|
|
@ -47,6 +47,7 @@ namespace FS
|
|||
public:
|
||||
static void init() {}
|
||||
virtual bool create(Report& report, const QString& deviceNode) const;
|
||||
virtual qint64 maxCapacity() const;
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
#include "fs/ext4.h"
|
||||
|
||||
#include "util/externalcommand.h"
|
||||
#include "util/capacity.h"
|
||||
|
||||
#include <QStringList>
|
||||
|
||||
|
@ -30,6 +31,11 @@ namespace FS
|
|||
{
|
||||
}
|
||||
|
||||
qint64 ext4::maxCapacity() const
|
||||
{
|
||||
return Capacity::unitFactor(Capacity::Byte, Capacity::EiB);
|
||||
}
|
||||
|
||||
bool ext4::create(Report& report, const QString& deviceNode) const
|
||||
{
|
||||
ExternalCommand cmd(report, "mkfs.ext4", QStringList() << "-q" << deviceNode);
|
||||
|
|
|
@ -47,6 +47,7 @@ namespace FS
|
|||
public:
|
||||
static void init() {}
|
||||
virtual bool create(Report& report, const QString& deviceNode) const;
|
||||
virtual qint64 maxCapacity() const;
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ namespace FS
|
|||
|
||||
qint64 fat32::maxCapacity() const
|
||||
{
|
||||
return 8 * Capacity::unitFactor(Capacity::Byte, Capacity::TiB);
|
||||
return 16 * Capacity::unitFactor(Capacity::Byte, Capacity::TiB);
|
||||
}
|
||||
|
||||
bool fat32::create(Report& report, const QString& deviceNode) const
|
||||
|
|
|
@ -70,7 +70,7 @@ namespace FS
|
|||
|
||||
qint64 hfsplus::maxCapacity() const
|
||||
{
|
||||
return Capacity::unitFactor(Capacity::Byte, Capacity::EiB);
|
||||
return 8 * Capacity::unitFactor(Capacity::Byte, Capacity::EiB);
|
||||
}
|
||||
|
||||
bool hfsplus::check(Report& report, const QString& deviceNode) const
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
|
||||
#include "fs/linuxswap.h"
|
||||
|
||||
#include "util/capacity.h"
|
||||
#include "util/externalcommand.h"
|
||||
|
||||
#include <klocale.h>
|
||||
|
|
|
@ -76,9 +76,9 @@ namespace FS
|
|||
return SupportTool("cryptsetup", KUrl("https://code.google.com/p/cryptsetup/"));
|
||||
}
|
||||
|
||||
qint64 luks::maxCapacity() const
|
||||
qint64 luks::minCapacity() const
|
||||
{
|
||||
return Capacity::unitFactor(Capacity::Byte, Capacity::EiB);
|
||||
return 3 * Capacity::unitFactor(Capacity::Byte, Capacity::MiB);
|
||||
}
|
||||
|
||||
QString luks::readUUID(const QString& deviceNode) const
|
||||
|
|
|
@ -57,7 +57,7 @@ namespace FS
|
|||
virtual CommandSupportType supportUpdateUUID() const { return m_UpdateUUID; }
|
||||
virtual CommandSupportType supportGetUUID() const { return m_GetUUID; }
|
||||
|
||||
virtual qint64 maxCapacity() const;
|
||||
virtual qint64 minCapacity() const;
|
||||
virtual SupportTool supportToolName() const;
|
||||
virtual bool supportToolFound() const;
|
||||
virtual QString readUUID(const QString& deviceNode) const;
|
||||
|
|
|
@ -82,9 +82,9 @@ namespace FS
|
|||
return SupportTool("lvm2", KUrl("http://sourceware.org/lvm2/"));
|
||||
}
|
||||
|
||||
qint64 lvm2_pv::maxCapacity() const
|
||||
qint64 lvm2_pv::minCapacity() const
|
||||
{
|
||||
return Capacity::unitFactor(Capacity::Byte, Capacity::EiB);
|
||||
return 5 * Capacity::unitFactor(Capacity::Byte, Capacity::EiB);
|
||||
}
|
||||
|
||||
bool lvm2_pv::check(Report& report, const QString& deviceNode) const
|
||||
|
|
|
@ -65,8 +65,7 @@ namespace FS
|
|||
virtual CommandSupportType supportUpdateUUID() const { return m_UpdateUUID; }
|
||||
virtual CommandSupportType supportGetUUID() const { return m_GetUUID; }
|
||||
|
||||
// virtual qint64 minCapacity() const;
|
||||
virtual qint64 maxCapacity() const;
|
||||
virtual qint64 minCapacity() const;
|
||||
virtual SupportTool supportToolName() const;
|
||||
virtual bool supportToolFound() const;
|
||||
|
||||
|
|
|
@ -100,7 +100,7 @@ namespace FS
|
|||
|
||||
qint64 nilfs2::maxCapacity() const
|
||||
{
|
||||
return Capacity::unitFactor(Capacity::Byte, Capacity::EiB);
|
||||
return 8 * Capacity::unitFactor(Capacity::Byte, Capacity::EiB);
|
||||
}
|
||||
|
||||
bool nilfs2::check(Report& report, const QString& deviceNode) const
|
||||
|
|
|
@ -90,9 +90,14 @@ namespace FS
|
|||
return SupportTool("ocfs2-tools", KUrl("http://oss.oracle.com/projects/ocfs2-tools/"));
|
||||
}
|
||||
|
||||
qint64 ocfs2::minCapacity() const
|
||||
{
|
||||
return 14000 * Capacity::unitFactor(Capacity::Byte, Capacity::KiB);
|
||||
}
|
||||
|
||||
qint64 ocfs2::maxCapacity() const
|
||||
{
|
||||
return Capacity::unitFactor(Capacity::Byte, Capacity::EiB);
|
||||
return 4 * Capacity::unitFactor(Capacity::Byte, Capacity::PiB);
|
||||
}
|
||||
|
||||
qint64 ocfs2::readUsedCapacity(const QString& deviceNode) const
|
||||
|
|
|
@ -64,6 +64,7 @@ namespace FS
|
|||
virtual CommandSupportType supportUpdateUUID() const { return m_UpdateUUID; }
|
||||
virtual CommandSupportType supportGetUUID() const { return m_GetUUID; }
|
||||
|
||||
virtual qint64 minCapacity() const;
|
||||
virtual qint64 maxCapacity() const;
|
||||
virtual SupportTool supportToolName() const;
|
||||
virtual bool supportToolFound() const;
|
||||
|
|
|
@ -92,7 +92,7 @@ namespace FS
|
|||
|
||||
qint64 xfs::maxCapacity() const
|
||||
{
|
||||
return Capacity::unitFactor(Capacity::Byte, Capacity::EiB);
|
||||
return 8 * Capacity::unitFactor(Capacity::Byte, Capacity::EiB);
|
||||
}
|
||||
|
||||
qint64 xfs::readUsedCapacity(const QString& deviceNode) const
|
||||
|
|
Loading…
Reference in New Issue