Fix compiling of mdassemble
(again). Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
This commit is contained in:
parent
fe6729fa8c
commit
c7654afc29
3
Makefile
3
Makefile
|
@ -65,9 +65,10 @@ SRCS = mdadm.c config.c mdstat.c ReadMe.c util.c Manage.c Assemble.c Build.c \
|
||||||
mdopen.c super0.c super1.c bitmap.c
|
mdopen.c super0.c super1.c bitmap.c
|
||||||
|
|
||||||
ASSEMBLE_SRCS := mdassemble.c Assemble.c config.c dlink.c util.c super0.c super1.c
|
ASSEMBLE_SRCS := mdassemble.c Assemble.c config.c dlink.c util.c super0.c super1.c
|
||||||
|
ASSEMBLE_FLAGS:= -DMDASSEMBLE
|
||||||
ifdef MDASSEMBLE_AUTO
|
ifdef MDASSEMBLE_AUTO
|
||||||
ASSEMBLE_SRCS += mdopen.c mdstat.c
|
ASSEMBLE_SRCS += mdopen.c mdstat.c
|
||||||
ASSEMBLE_FLAGS = -DMDASSEMBLE_AUTO
|
ASSEMBLE_FLAGS += -DMDASSEMBLE_AUTO
|
||||||
endif
|
endif
|
||||||
|
|
||||||
all : mdadm mdadm.man md.man mdadm.conf.man
|
all : mdadm mdadm.man md.man mdadm.conf.man
|
||||||
|
|
5
super0.c
5
super0.c
|
@ -52,6 +52,7 @@ static unsigned long calc_sb0_csum(mdp_super_t *super)
|
||||||
return newcsum;
|
return newcsum;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef MDASSEMBLE
|
||||||
static void examine_super0(void *sbv)
|
static void examine_super0(void *sbv)
|
||||||
{
|
{
|
||||||
mdp_super_t *sb = sbv;
|
mdp_super_t *sb = sbv;
|
||||||
|
@ -170,7 +171,7 @@ static void brief_detail_super0(void *sbv)
|
||||||
else
|
else
|
||||||
printf("%08x", sb->set_uuid0);
|
printf("%08x", sb->set_uuid0);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
static void uuid_from_super0(int uuid[4], void * sbv)
|
static void uuid_from_super0(int uuid[4], void * sbv)
|
||||||
{
|
{
|
||||||
mdp_super_t *super = sbv;
|
mdp_super_t *super = sbv;
|
||||||
|
@ -743,10 +744,12 @@ int write_bitmap0(struct supertype *st, int fd, void *sbv)
|
||||||
|
|
||||||
|
|
||||||
struct superswitch super0 = {
|
struct superswitch super0 = {
|
||||||
|
#ifndef MDASSEMBLE
|
||||||
.examine_super = examine_super0,
|
.examine_super = examine_super0,
|
||||||
.brief_examine_super = brief_examine_super0,
|
.brief_examine_super = brief_examine_super0,
|
||||||
.detail_super = detail_super0,
|
.detail_super = detail_super0,
|
||||||
.brief_detail_super = brief_detail_super0,
|
.brief_detail_super = brief_detail_super0,
|
||||||
|
#endif
|
||||||
.uuid_from_super = uuid_from_super0,
|
.uuid_from_super = uuid_from_super0,
|
||||||
.getinfo_super = getinfo_super0,
|
.getinfo_super = getinfo_super0,
|
||||||
.update_super = update_super0,
|
.update_super = update_super0,
|
||||||
|
|
6
super1.c
6
super1.c
|
@ -115,7 +115,7 @@ static unsigned int calc_sb_1_csum(struct mdp_superblock_1 * sb)
|
||||||
return csum;
|
return csum;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef MDASSEMBLE
|
||||||
static void examine_super1(void *sbv)
|
static void examine_super1(void *sbv)
|
||||||
{
|
{
|
||||||
struct mdp_superblock_1 *sb = sbv;
|
struct mdp_superblock_1 *sb = sbv;
|
||||||
|
@ -250,6 +250,8 @@ static void brief_detail_super1(void *sbv)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
static void uuid_from_super1(int uuid[4], void * sbv)
|
static void uuid_from_super1(int uuid[4], void * sbv)
|
||||||
{
|
{
|
||||||
struct mdp_superblock_1 *super = sbv;
|
struct mdp_superblock_1 *super = sbv;
|
||||||
|
@ -783,10 +785,12 @@ static __u64 avail_size1(__u64 devsize)
|
||||||
}
|
}
|
||||||
|
|
||||||
struct superswitch super1 = {
|
struct superswitch super1 = {
|
||||||
|
#ifndef MDASSEMBLE
|
||||||
.examine_super = examine_super1,
|
.examine_super = examine_super1,
|
||||||
.brief_examine_super = brief_examine_super1,
|
.brief_examine_super = brief_examine_super1,
|
||||||
.detail_super = detail_super1,
|
.detail_super = detail_super1,
|
||||||
.brief_detail_super = brief_detail_super1,
|
.brief_detail_super = brief_detail_super1,
|
||||||
|
#endif
|
||||||
.uuid_from_super = uuid_from_super1,
|
.uuid_from_super = uuid_from_super1,
|
||||||
.getinfo_super = getinfo_super1,
|
.getinfo_super = getinfo_super1,
|
||||||
.update_super = update_super1,
|
.update_super = update_super1,
|
||||||
|
|
Loading…
Reference in New Issue