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

0001 /*
0002     SPDX-FileCopyrightText: 2019 Shubham Jangra <aryan100jangid@gmail.com>
0003     SPDX-FileCopyrightText: 2020 Arnaud Ferraris <arnaud.ferraris@collabora.com>
0004     SPDX-FileCopyrightText: 2020 Gaƫl PORTAY <gael.portay@collabora.com>
0005 
0006     SPDX-License-Identifier: GPL-3.0-or-later
0007 */
0008  
0009 #ifndef KPMCORE_MINIX_H
0010 #define KPMCORE_MINIX_H
0011 
0012 #include "fs/filesystem.h"
0013 
0014 #include "util/libpartitionmanagerexport.h"
0015 
0016 class Report;
0017 
0018 class QString;
0019 
0020 namespace FS
0021 {
0022 /** A minix(Mini Unix) file system.
0023     @author Shubham <aryan100jangid@gmail.com>
0024  */    
0025 class LIBKPMCORE_EXPORT minix : public FileSystem
0026 {
0027 public:
0028     minix(qint64 firstsector, qint64 lastsector, qint64 sectorsused, const QString& label, const QVariantMap& features = {});
0029 
0030     void init() override;
0031     
0032     bool check(Report& report, const QString&deviceNode) const override;
0033     bool create(Report& report, const QString&deviceNode) override;
0034 
0035     QString posixPermissions() const override { return implPosixPermissions();  };
0036     void setPosixPermissions(const QString& permissions) override { implSetPosixPermissions(permissions); };
0037 
0038     CommandSupportType supportGetLabel() const override {
0039         return m_GetLabel;
0040     }
0041     
0042     CommandSupportType supportGetUsed() const override {
0043         return m_GetUsed;
0044     }
0045 
0046     CommandSupportType supportShrink() const override {
0047         return m_Shrink;
0048     }
0049 
0050     CommandSupportType supportMove() const override {
0051         return m_Move;
0052     }
0053     
0054     CommandSupportType supportCheck() const override {
0055         return m_Check;
0056     }
0057     
0058     CommandSupportType supportCreate() const override {
0059         return m_Create;
0060     }
0061     
0062     CommandSupportType supportCopy() const override {
0063         return m_Copy;
0064     }
0065     
0066     CommandSupportType supportBackup() const override {
0067         return m_Backup;
0068     }
0069 
0070     qint64 maxCapacity() const override;
0071     int maxLabelLength() const override;
0072     SupportTool supportToolName() const override;
0073     bool supportToolFound() const override;
0074 
0075 public:
0076     static CommandSupportType m_GetLabel;
0077     static CommandSupportType m_GetUsed;
0078     static CommandSupportType m_Shrink;
0079     static CommandSupportType m_Move;
0080     static CommandSupportType m_Create;
0081     static CommandSupportType m_Check;
0082     static CommandSupportType m_Copy;
0083     static CommandSupportType m_Backup;
0084 };
0085 }
0086 
0087 #endif