]> git.ipfire.org Git - ipfire-2.x.git/blobdiff - src/installer/hw.c
correct wrong headline at hardwaregraphs.cgi
[ipfire-2.x.git] / src / installer / hw.c
index ce9777500d5cbd28ecabdb10082f7fbd04760841..06bf42b6784fafa4c39d43a50938b50f5c6aed63 100644 (file)
@@ -165,7 +165,7 @@ static int hw_test_source_medium(const char* path) {
        // Umount the test device.
        hw_umount(SOURCE_MOUNT_PATH);
 
-       return (ret == 0);
+       return ret;
 }
 
 char* hw_find_source_medium(struct hw* hw) {
@@ -322,6 +322,9 @@ struct hw_disk** hw_find_disks(struct hw* hw, const char* sourcedrive) {
                                "%s - %s", size_str, p);
                }
 
+               // Cut off the description string after 40 characters
+               disk->description[41] = '\0';
+
                *disks++ = disk;
 
                if (--i == 0)
@@ -744,11 +747,11 @@ static int hw_format_filesystem(const char* path, int fs, const char* output) {
 
        // EXT4
        } else if (fs == HW_FS_EXT4) {
-               snprintf(cmd, sizeof(cmd), "/sbin/mke2fs -T ext4 %s", path);
+               snprintf(cmd, sizeof(cmd), "/sbin/mke2fs -FF -T ext4 %s", path);
 
        // 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);
+               snprintf(cmd, sizeof(cmd), "/sbin/mke2fs -FF -T ext4 -O ^has_journal %s", path);
 
        // XFS
        } else if (fs == HW_FS_XFS) {