File indexing completed on 2024-05-05 05:48:47

0001 /*
0002     SPDX-FileCopyrightText: 2008-2010 Volker Lanz <vl@fidra.de>
0003     SPDX-FileCopyrightText: 2008 Laurent Montel <montel@kde.org>
0004     SPDX-FileCopyrightText: 2013-2017 Andrius Štikonas <andrius@stikonas.eu>
0005     SPDX-FileCopyrightText: 2015 Chris Campbell <c.j.campbell@ed.ac.uk>
0006     SPDX-FileCopyrightText: 2020 Arnaud Ferraris <arnaud.ferraris@collabora.com>
0007     SPDX-FileCopyrightText: 2020 Gaël PORTAY <gael.portay@collabora.com>
0008 
0009     SPDX-License-Identifier: GPL-3.0-or-later
0010 */
0011 
0012 #ifndef KPMCORE_REISER4_H
0013 #define KPMCORE_REISER4_H
0014 
0015 #include "util/libpartitionmanagerexport.h"
0016 
0017 #include "fs/filesystem.h"
0018 
0019 #include <QtGlobal>
0020 
0021 class Report;
0022 
0023 class QString;
0024 
0025 namespace FS
0026 {
0027 /** A Reiser4 file system.
0028     @author Volker Lanz <vl@fidra.de>
0029  */
0030 class LIBKPMCORE_EXPORT reiser4 : public FileSystem
0031 {
0032 public:
0033     reiser4(qint64 firstsector, qint64 lastsector, qint64 sectorsused, const QString& label, const QVariantMap& features = {});
0034 
0035 public:
0036     void init() override;
0037 
0038     qint64 readUsedCapacity(const QString& deviceNode) const override;
0039     bool check(Report& report, const QString& deviceNode) const override;
0040     bool create(Report& report, const QString& deviceNode) override;
0041     QString posixPermissions() const override { return implPosixPermissions();  };
0042     void setPosixPermissions(const QString& permissions) override { implSetPosixPermissions(permissions); };
0043 
0044     CommandSupportType supportGetUsed() const override {
0045         return m_GetUsed;
0046     }
0047     CommandSupportType supportGetLabel() const override {
0048         return m_GetLabel;
0049     }
0050     CommandSupportType supportCreate() const override {
0051         return m_Create;
0052     }
0053     CommandSupportType supportMove() const override {
0054         return m_Move;
0055     }
0056     CommandSupportType supportCheck() const override {
0057         return m_Check;
0058     }
0059     CommandSupportType supportCopy() const override {
0060         return m_Copy;
0061     }
0062     CommandSupportType supportBackup() const override {
0063         return m_Backup;
0064     }
0065 
0066     qint64 maxCapacity() const override;
0067     int maxLabelLength() const override;
0068     SupportTool supportToolName() const override;
0069     bool supportToolFound() const override;
0070 
0071 public:
0072     static CommandSupportType m_GetUsed;
0073     static CommandSupportType m_GetLabel;
0074     static CommandSupportType m_Create;
0075     static CommandSupportType m_Move;
0076     static CommandSupportType m_Check;
0077     static CommandSupportType m_Copy;
0078     static CommandSupportType m_Backup;
0079 };
0080 }
0081 
0082 #endif