From aca6ac4826aea1777550838a8e87409a63520878 Mon Sep 17 00:00:00 2001 From: Ross Lagerwall Date: Wed, 10 Jun 2015 18:37:16 +0100 Subject: Add support for creating f2fs filesystems https://bugs.freedesktop.org/show_bug.cgi?id=63893 --- src/tests/integration-test | 7 ++++++- src/udiskslinuxfsinfo.c | 8 ++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/tests/integration-test b/src/tests/integration-test index d675cb4..6c137b6 100755 --- a/src/tests/integration-test +++ b/src/tests/integration-test @@ -281,6 +281,7 @@ class UDisksTestCase(unittest.TestCase): 'ntfs': 'mkntfs'} label_opt = {'vfat': '-n', 'exfat': '-n', + 'f2fs': '-l', 'reiserfs': '-l'} extra_opt = {'vfat': ['-I', '-F', '32'], 'swap': ['-f'], @@ -643,6 +644,10 @@ class FS(UDisksTestCase): '''fs: btrfs''' self._do_fs_check('btrfs') + def test_f2fs(self): + '''fs: f2fs''' + self._do_fs_check('f2fs') + def test_minix(self): '''fs: minix''' self._do_fs_check('minix') @@ -992,7 +997,7 @@ class FS(UDisksTestCase): except GLib.GError as e: if 'UDisks2.Error.NotSupported' in e.message: # these fses are known to not support relabeling - self.assertIn(type, ['minix', 'btrfs']) + self.assertIn(type, ['minix', 'btrfs', 'f2fs']) supported = False else: raise diff --git a/src/udiskslinuxfsinfo.c b/src/udiskslinuxfsinfo.c index 0a12208..9a27b0f 100644 --- a/src/udiskslinuxfsinfo.c +++ b/src/udiskslinuxfsinfo.c @@ -123,6 +123,14 @@ const FSInfo _fs_info[] = FALSE, /* supports_owners */ "mkudffs --vid $LABEL $DEVICE", }, + { + "f2fs", + NULL, + NULL, + FALSE, /* supports_online_label_rename */ + TRUE, /* supports_owners */ + "mkfs.f2fs -l $LABEL $DEVICE", + }, /* swap space */ { "swap", -- cgit v1.2.3