X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=util-linux%2Fvolume_id%2Fsysv.c;h=cd4cd906b13424219bb604fd9166336a6bf90f11;hb=5b2cc0aaee6985431d9bab1b49ceea7e1fa1d7af;hp=7a99cd6c75bb05ac9a6cac8dd40a7522b96d5f72;hpb=d5f1b1bbe0a881f66b6bb6951fa54e553002c24d;p=oweals%2Fbusybox.git diff --git a/util-linux/volume_id/sysv.c b/util-linux/volume_id/sysv.c index 7a99cd6c7..cd4cd906b 100644 --- a/util-linux/volume_id/sysv.c +++ b/util-linux/volume_id/sysv.c @@ -18,6 +18,13 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +//kbuild:lib-$(CONFIG_FEATURE_VOLUMEID_SYSV) += sysv.o + +//config:config FEATURE_VOLUMEID_SYSV +//config: bool "sysv filesystem" +//config: default y +//config: depends on VOLUMEID + #include "volume_id_internal.h" #define SYSV_NICINOD 100 @@ -48,7 +55,7 @@ struct sysv_super { uint32_t s_state; uint32_t s_magic; uint32_t s_type; -} __attribute__((__packed__)); +} PACKED; #define XENIX_NICINOD 100 #define XENIX_NICFREE 100 @@ -74,7 +81,7 @@ struct xenix_super { uint8_t s_fill[371]; uint32_t s_magic; uint32_t s_type; -} __attribute__((__packed__)); +} PACKED; #define SYSV_SUPERBLOCK_BLOCK 0x01 #define SYSV_MAGIC 0xfd187e20 @@ -82,7 +89,7 @@ struct xenix_super { #define XENIX_MAGIC 0x2b5544 #define SYSV_MAX_BLOCKSIZE 0x800 -int volume_id_probe_sysv(struct volume_id *id /*,uint64_t off*/) +int FAST_FUNC volume_id_probe_sysv(struct volume_id *id /*,uint64_t off*/) { #define off ((uint64_t)0) struct sysv_super *vs; @@ -99,7 +106,7 @@ int volume_id_probe_sysv(struct volume_id *id /*,uint64_t off*/) if (vs->s_magic == cpu_to_le32(SYSV_MAGIC) || vs->s_magic == cpu_to_be32(SYSV_MAGIC)) { // volume_id_set_label_raw(id, vs->s_fname, 6); volume_id_set_label_string(id, vs->s_fname, 6); -// id->type = "sysv"; + IF_FEATURE_BLKID_TYPE(id->type = "sysv"); goto found; } } @@ -112,7 +119,7 @@ int volume_id_probe_sysv(struct volume_id *id /*,uint64_t off*/) if (xs->s_magic == cpu_to_le32(XENIX_MAGIC) || xs->s_magic == cpu_to_be32(XENIX_MAGIC)) { // volume_id_set_label_raw(id, xs->s_fname, 6); volume_id_set_label_string(id, xs->s_fname, 6); -// id->type = "xenix"; + IF_FEATURE_BLKID_TYPE(id->type = "xenix";) goto found; } }