diff options
author | NeilBrown <neilb@suse.de> | 2013-07-02 10:46:43 +1000 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2013-07-02 10:46:43 +1000 |
commit | eb2306f8411070bc7bcd46ad8fee0f02c826380a (patch) | |
tree | 5c6f4ea1dfcff54dd2f83f5f81bce779ea416908 /mdadm.h | |
parent | babb8dd4274c80b08af3f583a136a9f12e9b5f69 (diff) |
Config: use better device names for "DEVICES container"
When "containers" appears on the "DEVICES" line (which is does by
default), use names from the mdadm map file instead of kernel names,
when possible.
This mean that the name will be more likely to appear in mdadm.conf
and so more likely to match "container=" tags.
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'mdadm.h')
-rw-r--r-- | mdadm.h | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -484,12 +484,22 @@ extern int map_update(struct map_ent **mpp, char *devnm, char *metadata, int uuid[4], char *path); extern void map_remove(struct map_ent **map, char *devnm); extern struct map_ent *map_by_uuid(struct map_ent **map, int uuid[4]); +#ifdef MDASSEMBLE +static inline struct map_ent *map_by_devnm(struct map_ent **map, char *name) +{ + return NULL; +} +static inline void map_free(struct map_ent *map) +{ +} +#else extern struct map_ent *map_by_devnm(struct map_ent **map, char *devnm); +extern void map_free(struct map_ent *map); +#endif extern struct map_ent *map_by_name(struct map_ent **map, char *name); extern void map_read(struct map_ent **melp); extern int map_write(struct map_ent *mel); extern void map_delete(struct map_ent **mapp, char *devnm); -extern void map_free(struct map_ent *map); extern void map_add(struct map_ent **melp, char *devnm, char *metadata, int uuid[4], char *path); extern int map_lock(struct map_ent **melp); |