Add support for minix file system (!12)
Util-linux package, at least as far back as version 2.23.2 as found on CentOS 7, provides the mkfs.minix and fsck.minix commands. Also blkid from the same package, recognises minix file systems. Create version 3 file systems because MINIX 3 [1] is the only supported version and that reportedly uses version 3 of the file system [2]. [1] MINIX 3 / History https://en.wikipedia.org/wiki/MINIX_3#History [2] Regarding MINIX 3 file system https://groups.google.com/forum/#!topic/minix3/3-TeHR_23X8 "MINIX 3 uses Minix File System (MFS). More precisely MFS V3." Closes !12 - Add minix file system support
This commit is contained in:
parent
92f6946e24
commit
03e89b1289
1
README
1
README
|
@ -276,6 +276,7 @@ provide this support:
|
||||||
reiser4progs
|
reiser4progs
|
||||||
reiserfsprogs / reiserfs-utils / reiserfs
|
reiserfsprogs / reiserfs-utils / reiserfs
|
||||||
udftools
|
udftools
|
||||||
|
util-linux - required to create and check MINIX file systems
|
||||||
xfsprogs, xfsdump
|
xfsprogs, xfsdump
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -16,8 +16,8 @@
|
||||||
</_p>
|
</_p>
|
||||||
<_p>
|
<_p>
|
||||||
GParted works with many file systems including: btrfs, ext2, ext3,
|
GParted works with many file systems including: btrfs, ext2, ext3,
|
||||||
ext4, fat16, fat32, hfs, hfs+, linux-swap, lvm2 pv, nilfs2, ntfs,
|
ext4, fat16, fat32, hfs, hfs+, linux-swap, lvm2 pv, minix, nilfs2,
|
||||||
reiserfs, reiser4, udf, ufs, and xfs.
|
ntfs, reiserfs, reiser4, udf, ufs, and xfs.
|
||||||
</_p>
|
</_p>
|
||||||
</description>
|
</description>
|
||||||
<url type="homepage">https://gparted.org</url>
|
<url type="homepage">https://gparted.org</url>
|
||||||
|
|
|
@ -62,6 +62,7 @@ EXTRA_DIST = \
|
||||||
linux_swap.h \
|
linux_swap.h \
|
||||||
lvm2_pv.h \
|
lvm2_pv.h \
|
||||||
luks.h \
|
luks.h \
|
||||||
|
minix.h \
|
||||||
nilfs2.h \
|
nilfs2.h \
|
||||||
ntfs.h \
|
ntfs.h \
|
||||||
reiser4.h \
|
reiser4.h \
|
||||||
|
|
|
@ -81,26 +81,27 @@ enum FSType
|
||||||
FS_LINUX_SWAP = 16,
|
FS_LINUX_SWAP = 16,
|
||||||
FS_LUKS = 17,
|
FS_LUKS = 17,
|
||||||
FS_LVM2_PV = 18,
|
FS_LVM2_PV = 18,
|
||||||
FS_NILFS2 = 19,
|
FS_MINIX = 19,
|
||||||
FS_NTFS = 20,
|
FS_NILFS2 = 20,
|
||||||
FS_REISER4 = 21,
|
FS_NTFS = 21,
|
||||||
FS_REISERFS = 22,
|
FS_REISER4 = 22,
|
||||||
FS_UDF = 23,
|
FS_REISERFS = 23,
|
||||||
FS_UFS = 24,
|
FS_UDF = 24,
|
||||||
FS_XFS = 25,
|
FS_UFS = 25,
|
||||||
|
FS_XFS = 26,
|
||||||
|
|
||||||
// Recognised signatures but otherwise unsupported file system types
|
// Recognised signatures but otherwise unsupported file system types
|
||||||
FS_BITLOCKER = 26,
|
FS_BITLOCKER = 27,
|
||||||
FS_GRUB2_CORE_IMG = 27,
|
FS_GRUB2_CORE_IMG = 28,
|
||||||
FS_ISO9660 = 28,
|
FS_ISO9660 = 29,
|
||||||
FS_LINUX_SWRAID = 29,
|
FS_LINUX_SWRAID = 30,
|
||||||
FS_LINUX_SWSUSPEND = 30,
|
FS_LINUX_SWSUSPEND = 31,
|
||||||
FS_REFS = 31,
|
FS_REFS = 32,
|
||||||
FS_ZFS = 32,
|
FS_ZFS = 33,
|
||||||
|
|
||||||
// Partition space usage colours
|
// Partition space usage colours
|
||||||
FS_USED = 33,
|
FS_USED = 34,
|
||||||
FS_UNUSED = 34
|
FS_UNUSED = 35
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
enum SIZE_UNIT
|
enum SIZE_UNIT
|
||||||
|
|
|
@ -0,0 +1,38 @@
|
||||||
|
/* Copyright (C) 2018 Mike Fleetwood
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef GPARTED_MINIX_H
|
||||||
|
#define GPARTED_MINIX_H
|
||||||
|
|
||||||
|
#include "FileSystem.h"
|
||||||
|
#include "OperationDetail.h"
|
||||||
|
#include "Partition.h"
|
||||||
|
|
||||||
|
namespace GParted
|
||||||
|
{
|
||||||
|
|
||||||
|
class minix : public FileSystem
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
FS get_filesystem_support();
|
||||||
|
bool create( const Partition & new_partition, OperationDetail & operationdetail );
|
||||||
|
bool check_repair( const Partition & partition, OperationDetail & operationdetail );
|
||||||
|
};
|
||||||
|
|
||||||
|
} //GParted
|
||||||
|
|
||||||
|
#endif /* GPARTED_MINIX_H */
|
|
@ -57,6 +57,7 @@ src/linux_swap.cc
|
||||||
src/lvm2_pv.cc
|
src/lvm2_pv.cc
|
||||||
src/luks.cc
|
src/luks.cc
|
||||||
src/main.cc
|
src/main.cc
|
||||||
|
src/minix.cc
|
||||||
src/ntfs.cc
|
src/ntfs.cc
|
||||||
src/nilfs2.cc
|
src/nilfs2.cc
|
||||||
src/reiser4.cc
|
src/reiser4.cc
|
||||||
|
|
|
@ -43,6 +43,7 @@
|
||||||
#include "lvm2_pv.h"
|
#include "lvm2_pv.h"
|
||||||
#include "luks.h"
|
#include "luks.h"
|
||||||
#include "reiserfs.h"
|
#include "reiserfs.h"
|
||||||
|
#include "minix.h"
|
||||||
#include "nilfs2.h"
|
#include "nilfs2.h"
|
||||||
#include "ntfs.h"
|
#include "ntfs.h"
|
||||||
#include "xfs.h"
|
#include "xfs.h"
|
||||||
|
@ -1445,6 +1446,8 @@ FSType GParted_Core::detect_filesystem( PedDevice * lp_device, PedPartition * lp
|
||||||
return GParted::FS_FAT16 ;
|
return GParted::FS_FAT16 ;
|
||||||
else if ( fsname == "fat32" )
|
else if ( fsname == "fat32" )
|
||||||
return GParted::FS_FAT32 ;
|
return GParted::FS_FAT32 ;
|
||||||
|
else if ( fsname == "minix" )
|
||||||
|
return FS_MINIX;
|
||||||
else if ( fsname == "nilfs2" )
|
else if ( fsname == "nilfs2" )
|
||||||
return GParted::FS_NILFS2 ;
|
return GParted::FS_NILFS2 ;
|
||||||
else if ( fsname == "ntfs" )
|
else if ( fsname == "ntfs" )
|
||||||
|
@ -4152,6 +4155,7 @@ void GParted_Core::init_filesystems()
|
||||||
FILESYSTEM_MAP[FS_LINUX_SWAP] = new linux_swap();
|
FILESYSTEM_MAP[FS_LINUX_SWAP] = new linux_swap();
|
||||||
FILESYSTEM_MAP[FS_LVM2_PV] = new lvm2_pv();
|
FILESYSTEM_MAP[FS_LVM2_PV] = new lvm2_pv();
|
||||||
FILESYSTEM_MAP[FS_LUKS] = new luks();
|
FILESYSTEM_MAP[FS_LUKS] = new luks();
|
||||||
|
FILESYSTEM_MAP[FS_MINIX] = new minix();
|
||||||
FILESYSTEM_MAP[FS_NILFS2] = new nilfs2();
|
FILESYSTEM_MAP[FS_NILFS2] = new nilfs2();
|
||||||
FILESYSTEM_MAP[FS_NTFS] = new ntfs();
|
FILESYSTEM_MAP[FS_NTFS] = new ntfs();
|
||||||
FILESYSTEM_MAP[FS_REISER4] = new reiser4();
|
FILESYSTEM_MAP[FS_REISER4] = new reiser4();
|
||||||
|
|
|
@ -72,6 +72,7 @@ gpartedbin_SOURCES = \
|
||||||
lvm2_pv.cc \
|
lvm2_pv.cc \
|
||||||
luks.cc \
|
luks.cc \
|
||||||
main.cc \
|
main.cc \
|
||||||
|
minix.cc \
|
||||||
nilfs2.cc \
|
nilfs2.cc \
|
||||||
ntfs.cc \
|
ntfs.cc \
|
||||||
reiser4.cc \
|
reiser4.cc \
|
||||||
|
|
|
@ -114,6 +114,7 @@ Glib::ustring Utils::get_color( FSType filesystem )
|
||||||
case FS_USED : return "#F8F8BA" ; // ~ light tan yellow
|
case FS_USED : return "#F8F8BA" ; // ~ light tan yellow
|
||||||
case FS_UNUSED : return "#FFFFFF" ; //white
|
case FS_UNUSED : return "#FFFFFF" ; //white
|
||||||
case FS_LVM2_PV : return "#B39169" ; //face skin dark
|
case FS_LVM2_PV : return "#B39169" ; //face skin dark
|
||||||
|
case FS_MINIX : return "#9DB8D2" ; // Blue Highlight
|
||||||
case FS_BITLOCKER : return "#494066" ; //purple shadow
|
case FS_BITLOCKER : return "#494066" ; //purple shadow
|
||||||
case FS_GRUB2_CORE_IMG : return "#666666" ; //~ dark gray
|
case FS_GRUB2_CORE_IMG : return "#666666" ; //~ dark gray
|
||||||
case FS_ISO9660 : return "#D3D3D3" ; // ~ light gray
|
case FS_ISO9660 : return "#D3D3D3" ; // ~ light gray
|
||||||
|
@ -227,6 +228,7 @@ int Utils::get_filesystem_label_maxlength( FSType filesystem )
|
||||||
case FS_JFS : return 11 ;
|
case FS_JFS : return 11 ;
|
||||||
case FS_LINUX_SWAP : return 15 ;
|
case FS_LINUX_SWAP : return 15 ;
|
||||||
//case FS_LVM2_PV : return ;
|
//case FS_LVM2_PV : return ;
|
||||||
|
case FS_MINIX : return 0; // MINIX doesn't support labelling.
|
||||||
case FS_NILFS2 : return 80 ;
|
case FS_NILFS2 : return 80 ;
|
||||||
case FS_NTFS : return 128 ;
|
case FS_NTFS : return 128 ;
|
||||||
case FS_REISER4 : return 16 ;
|
case FS_REISER4 : return 16 ;
|
||||||
|
@ -294,6 +296,7 @@ Glib::ustring Utils::get_filesystem_string( FSType filesystem )
|
||||||
case FS_USED : return _("used") ;
|
case FS_USED : return _("used") ;
|
||||||
case FS_UNUSED : return _("unused") ;
|
case FS_UNUSED : return _("unused") ;
|
||||||
case FS_LVM2_PV : return "lvm2 pv" ;
|
case FS_LVM2_PV : return "lvm2 pv" ;
|
||||||
|
case FS_MINIX : return "minix";
|
||||||
case FS_BITLOCKER : return "bitlocker" ;
|
case FS_BITLOCKER : return "bitlocker" ;
|
||||||
case FS_GRUB2_CORE_IMG : return "grub2 core.img";
|
case FS_GRUB2_CORE_IMG : return "grub2 core.img";
|
||||||
case FS_ISO9660 : return "iso9660";
|
case FS_ISO9660 : return "iso9660";
|
||||||
|
@ -337,6 +340,7 @@ const Glib::ustring Utils::get_filesystem_kernel_name( FSType fstype )
|
||||||
case FS_HFS : return "hfs";
|
case FS_HFS : return "hfs";
|
||||||
case FS_HFSPLUS : return "hfsplus";
|
case FS_HFSPLUS : return "hfsplus";
|
||||||
case FS_JFS : return "jfs";
|
case FS_JFS : return "jfs";
|
||||||
|
case FS_MINIX : return "minix";
|
||||||
case FS_NILFS2 : return "nilfs2";
|
case FS_NILFS2 : return "nilfs2";
|
||||||
case FS_NTFS : return "ntfs";
|
case FS_NTFS : return "ntfs";
|
||||||
case FS_REISER4 : return "reiser4";
|
case FS_REISER4 : return "reiser4";
|
||||||
|
@ -365,6 +369,7 @@ Glib::ustring Utils::get_filesystem_software( FSType filesystem )
|
||||||
case FS_LINUX_SWAP : return "util-linux" ;
|
case FS_LINUX_SWAP : return "util-linux" ;
|
||||||
case FS_LVM2_PV : return "lvm2" ;
|
case FS_LVM2_PV : return "lvm2" ;
|
||||||
case FS_LUKS : return "cryptsetup, dmsetup";
|
case FS_LUKS : return "cryptsetup, dmsetup";
|
||||||
|
case FS_MINIX : return "util-linux";
|
||||||
case FS_NILFS2 : return "nilfs-utils" ;
|
case FS_NILFS2 : return "nilfs-utils" ;
|
||||||
case FS_NTFS : return "ntfs-3g / ntfsprogs" ;
|
case FS_NTFS : return "ntfs-3g / ntfsprogs" ;
|
||||||
case FS_REISER4 : return "reiser4progs" ;
|
case FS_REISER4 : return "reiser4progs" ;
|
||||||
|
|
|
@ -0,0 +1,58 @@
|
||||||
|
/* Copyright (C) 2018 Mike Fleetwood
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "FileSystem.h"
|
||||||
|
#include "OperationDetail.h"
|
||||||
|
#include "Partition.h"
|
||||||
|
#include "Utils.h"
|
||||||
|
#include "minix.h"
|
||||||
|
|
||||||
|
#include <glibmm.h>
|
||||||
|
|
||||||
|
namespace GParted
|
||||||
|
{
|
||||||
|
|
||||||
|
FS minix::get_filesystem_support()
|
||||||
|
{
|
||||||
|
FS fs( FS_MINIX );
|
||||||
|
|
||||||
|
fs.busy = FS::GPARTED;
|
||||||
|
fs.move = FS::GPARTED;
|
||||||
|
fs.copy = FS::GPARTED;
|
||||||
|
fs.online_read = FS::GPARTED;
|
||||||
|
|
||||||
|
if ( ! Glib::find_program_in_path( "mkfs.minix").empty() )
|
||||||
|
fs.create = FS::EXTERNAL;
|
||||||
|
|
||||||
|
if ( ! Glib::find_program_in_path( "fsck.minix").empty() )
|
||||||
|
fs.check = FS::EXTERNAL;
|
||||||
|
|
||||||
|
return fs;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool minix::create( const Partition & new_partition, OperationDetail & operationdetail )
|
||||||
|
{
|
||||||
|
return ! execute_command( "mkfs.minix -3 " + Glib::shell_quote( new_partition.get_path() ),
|
||||||
|
operationdetail, EXEC_CHECK_STATUS );
|
||||||
|
}
|
||||||
|
|
||||||
|
bool minix::check_repair( const Partition & partition, OperationDetail & operationdetail )
|
||||||
|
{
|
||||||
|
return ! execute_command( "fsck.minix " + Glib::shell_quote( partition.get_path() ),
|
||||||
|
operationdetail, EXEC_CHECK_STATUS|EXEC_CANCEL_SAFE );
|
||||||
|
}
|
||||||
|
|
||||||
|
} //GParted
|
Loading…
Reference in New Issue