OSDN Git Service

Add interpretation of OS Creator values for FreeBSD and Lites in mke2fs
authorTheodore Ts'o <tytso@mit.edu>
Wed, 19 Jan 2005 23:18:44 +0000 (18:18 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Wed, 19 Jan 2005 23:18:44 +0000 (18:18 -0500)
and dumpe2fs.

Eventually, we should fold this into a single function for converting
numbers to creator os codes, and vice versa (in TODO file)

TODO
lib/e2p/ls.c
misc/mke2fs.c

diff --git a/TODO b/TODO
index 3339705..16bd0b0 100644 (file)
--- a/TODO
+++ b/TODO
@@ -202,3 +202,8 @@ From e2fsprogs Debian TODO file as of 1.10-13.
 
 Add --lba option to debian icheck command, and have ways of making it
 easier to translate LBA to filesystem block numbers.
+
+-------------------------------------------------------
+
+Move creator_os string parsing and unparsing from mke2fs and e2p/ls.c
+to a centralized e2p library function.
index f5a8af7..0bd7411 100644 (file)
@@ -192,6 +192,8 @@ void list_super2(struct ext2_super_block * sb, FILE *f)
            case EXT2_OS_LINUX: os = "Linux"; break;
            case EXT2_OS_HURD:  os = "GNU/Hurd"; break;
            case EXT2_OS_MASIX: os = "Masix"; break;
+           case EXT2_OS_FREEBSD: os = "FreeBSD"; break;
+           case EXT2_OS_LITES: os = "Lites"; break;
            default:            os = "unknown"; break;
        }
        fprintf(f, "Filesystem OS type:       %s\n", os);
index 4a214a5..c7afeae 100644 (file)
@@ -702,6 +702,8 @@ static void show_stats(ext2_filsys fs)
            case EXT2_OS_LINUX: fputs("Linux", stdout); break;
            case EXT2_OS_HURD:  fputs("GNU/Hurd", stdout);   break;
            case EXT2_OS_MASIX: fputs ("Masix", stdout); break;
+           case EXT2_OS_FREEBSD: fputs ("FerrBSD", stdout); break;
+           case EXT2_OS_LITES: fputs ("Lites", stdout); break;
            default:            fputs(_("(unknown os)"), stdout);
         }
        printf("\n");
@@ -767,6 +769,10 @@ static int set_os(struct ext2_super_block *sb, char *os)
                sb->s_creator_os = EXT2_OS_HURD;
        else if (strcasecmp(os, "masix") == 0)
                sb->s_creator_os = EXT2_OS_MASIX;
+       else if (strcasecmp(os, "freebsd") == 0)
+               sb->s_creator_os = EXT2_OS_FREEBSD;
+       else if (strcasecmp(os, "lites") == 0)
+               sb->s_creator_os = EXT2_OS_LITES;
        else
                return 0;
        return 1;