Common BSD tag for FreeBSD, NetBSD, OpenBSD and DragonFly BSD.
PATCH 1/1 Common BSD tag for FreeBSD, NetBSD, OpenBSD and DragonFly BSD.
- All BSD will appear now as "BSD" under the OS creator field.
- Minor adjustments to multiple #if's
Signed-off-by Antonio Huete Jimenez <[email protected]>
--- lib/e2p/ostype.c | 2 +- lib/ext2fs/ext2_fs.h | 2 +- lib/ext2fs/initialize.c | 19 ++++++------------- misc/mke2fs.c | 8 +++++++- 4 files changed, 15 insertions(+), 16 deletions(-)
lib/e2p/ostype.c +1 -1
@@ -18,7 +18,7 @@ static const char *os_tab[] = {"Linux" ,"Hurd" ,"Masix" , -"FreeBSD" , +"BSD" ,"Lites" , 0 };
lib/ext2fs/ext2_fs.h +1 -1
@@ -680,7 +680,7 @@ struct ext2_super_block {#define EXT2_OS_LINUX 0#define EXT2_OS_HURD 1#define EXT2_OBSO_OS_MASIX 2 -#define EXT2_OS_FREEBSD 3 +#define EXT2_OS_BSD 3#define EXT2_OS_LITES 4/*
lib/ext2fs/initialize.c +6 -13
@@ -28,23 +28,16 @@#include "ext2_fs.h" #include "ext2fs.h" -#if defined(__linux__) && defined(EXT2_OS_LINUX ) -#define CREATOR_OS EXT2_OS_LINUX -#else -#if defined(__GNU__) && defined(EXT2_OS_HURD ) +#if defined(__GNU__) && defined(EXT2_OS_HURD )#define CREATOR_OS EXT2_OS_HURD -#else -#if defined(__FreeBSD__) && defined(EXT2_OS_FREEBSD ) -#define CREATOR_OS EXT2_OS_FREEBSD -#else -#if defined(LITES ) && defined(EXT2_OS_LITES ) +#elif (defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) \ + || defined(__DragonFly__)) && defined(EXT2_OS_BSD ) +#define CREATOR_OS EXT2_OS_BSD +#elif defined(LITES ) && defined(EXT2_OS_LITES )#define CREATOR_OS EXT2_OS_LITES#else #define CREATOR_OS EXT2_OS_LINUX/* by default */ -#endif /* defined(LITES) && defined(EXT2_OS_LITES) */ -#endif /* defined(__FreeBSD__) && defined(EXT2_OS_FREEBSD) */ -#endif /* defined(__GNU__) && defined(EXT2_OS_HURD) */ -#endif /* defined(__linux__) && defined(EXT2_OS_LINUX) */ +#endif /* * Calculate the number of GDT blocks to reserve for online filesystem growth.
misc/mke2fs.c +7 -1
@@ -665,7 +665,13 @@ static int set_os(struct ext2_super_block *sb, char *os)else if (strcasecmp (os,"GNU" ) ==0 ||strcasecmp (os,"hurd" ) ==0 ) sb->s_creator_os =EXT2_OS_HURD ;else if (strcasecmp (os,"freebsd" ) ==0 ) - sb->s_creator_os =EXT2_OS_FREEBSD ; + sb->s_creator_os =EXT2_OS_BSD ; +else if (strcasecmp (os,"netbsd" ) ==0 ) + sb->s_creator_os =EXT2_OS_BSD ; +else if (strcasecmp (os,"openbsd" ) ==0 ) + sb->s_creator_os =EXT2_OS_BSD ; +else if (strcasecmp (os,"dragonfly" ) ==0 ) + sb->s_creator_os =EXT2_OS_BSD ;else if (strcasecmp (os,"lites" ) ==0 ) sb->s_creator_os =EXT2_OS_LITES ;else
Signature · 1 line
1.7.7.2