]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blobdiff - src/install+setup/install/hw.c
installer: Add support for XFS.
[people/pmueller/ipfire-2.x.git] / src / install+setup / install / hw.c
index 9e505cac5d3e3fe708009b79f1f3e38e55ca5b36..e19632c97931f28b3a91998945d327baf206e8e4 100644 (file)
@@ -604,6 +604,10 @@ static int hw_format_filesystem(const char* path, int fs) {
        // EXT4 w/o journal
        } else if (fs == HW_FS_EXT4_WO_JOURNAL) {
                snprintf(cmd, sizeof(cmd), "/sbin/mke2fs -T ext4 -O ^has_journal %s", path);
+
+       // XFS
+       } else if (fs == HW_FS_XFS) {
+               snprintf(cmd, sizeof(cmd), "/sbin/mkfs.xfs -f %s", path);
        }
 
        assert(*cmd);
@@ -661,6 +665,10 @@ int hw_mount_filesystems(struct hw_destination* dest, const char* prefix) {
                        filesystem = "ext4";
                        break;
 
+               case HW_FS_XFS:
+                       filesystem = "xfs";
+                       break;
+
                default:
                        assert(0);
        }