From 703270b64cb08ec4be005cea2b1b40e51d08b32a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrius=20=C5=A0tikonas?= Date: Sun, 3 Sep 2017 18:40:19 +0100 Subject: [PATCH] udf: do not hardcode min/max sector size. --- src/fs/udf.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/fs/udf.cpp b/src/fs/udf.cpp index d600c22..0400091 100644 --- a/src/fs/udf.cpp +++ b/src/fs/udf.cpp @@ -62,14 +62,12 @@ FileSystem::SupportTool udf::supportToolName() const qint64 udf::minCapacity() const { - // TODO: Capacity depends on logical (sector) size of disk, now hardcoded as 512 - return MIN_UDF_BLOCKS * 512; + return MIN_UDF_BLOCKS * sectorSize(); } qint64 udf::maxCapacity() const { - // TODO: Capacity depends on logical (sector) size of disk, now hardcoded as 4096 - return MAX_UDF_BLOCKS * 4096; + return MAX_UDF_BLOCKS * sectorSize(); } qint64 udf::maxLabelLength() const @@ -135,6 +133,8 @@ bool udf::createWithLabel(Report& report, const QString& deviceNode, const QStri labelArgs << QStringLiteral("--vid=") + shortLabel; } + // mkudffs from udftools prior to 1.1 is not able to detect logical (sector) size + // and UDF block size must match logical sector size of underlying media QStringList cmdArgs; cmdArgs << QStringLiteral("--utf8"); // TODO: Add GUI option for choosing different optical disks and UDF revision