Skip to content

Commit 5a23a06

Browse files
committed
mdassemble - fix new compile-time problems.
Signed-off-by: NeilBrown <[email protected]>
1 parent e6fc80a commit 5a23a06

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

mdassemble.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ int create_mddev(char *dev, char *name, int autof/*unused*/, int trustworthy,
4848
return open_mddev(dev, 0);
4949
}
5050
#endif
51-
int map_update(struct map_ent **mpp, int devnum, char *metadata,
51+
int map_update(struct map_ent **mpp, char *devnm, char *metadata,
5252
int *uuid, char *path)
5353
{
5454
return 0;
@@ -57,6 +57,9 @@ struct map_ent *map_by_name(struct map_ent **mpp, char *name)
5757
{
5858
return NULL;
5959
}
60+
int map_lock(struct map_ent **melp){return 0;}
61+
void map_unlock(struct map_ent **melp){}
62+
struct map_ent *map_by_uuid(struct map_ent **map, int uuid[4]){return NULL;}
6063

6164
int rv;
6265
int mdfd = -1;

super1.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1012,12 +1012,13 @@ static int update_super1(struct supertype *st, struct mdinfo *info,
10121012
long bm_sectors = 0;
10131013
long space;
10141014

1015+
#ifndef MDASSEMBLE
10151016
if (sb->feature_map & __cpu_to_le32(MD_FEATURE_BITMAP_OFFSET)) {
10161017
struct bitmap_super_s *bsb;
10171018
bsb = (struct bitmap_super_s *)(((char*)sb)+MAX_SB_SIZE);
10181019
bm_sectors = bitmap_sectors(bsb);
10191020
}
1020-
1021+
#endif
10211022
if (sb_offset < data_offset) {
10221023
/* 1.1 or 1.2. Put bbl just before data
10231024
*/

util.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -777,7 +777,6 @@ int get_data_disks(int level, int layout, int raid_disks)
777777
return data_disks;
778778
}
779779

780-
#if !defined(MDASSEMBLE) || defined(MDASSEMBLE) && defined(MDASSEMBLE_AUTO)
781780

782781
int devnm2devid(char *devnm)
783782
{
@@ -815,6 +814,7 @@ int devnm2devid(char *devnm)
815814
return 0;
816815
}
817816

817+
#if !defined(MDASSEMBLE) || defined(MDASSEMBLE) && defined(MDASSEMBLE_AUTO)
818818
char *get_md_name(char *devnm)
819819
{
820820
/* find /dev/md%d or /dev/md/%d or make a device /dev/.tmp.md%d */

0 commit comments

Comments
 (0)