diff options
author | Doug Ledford <dledford@redhat.com> | 2010-03-17 15:52:22 +0100 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2010-03-23 23:37:34 +0100 |
commit | e259df4e63f553c1271fa7d7612c110d2518e572 (patch) | |
tree | 0acfce8a4fd8b32adbb4c0645b3f2f1a403160db | |
parent | Create directory to contain mapfile (Assuming parent exists and (diff) | |
download | mdadm-e259df4e63f553c1271fa7d7612c110d2518e572.tar.xz mdadm-e259df4e63f553c1271fa7d7612c110d2518e572.zip |
mapfile: if we putting the mapfile in a custom location via ALT_RUN, allow
a custom filename too.
Signed-off-by: Doug Ledford <dledford@redhat.com>
-rw-r--r-- | Makefile | 3 | ||||
-rw-r--r-- | mapfile.c | 2 | ||||
-rw-r--r-- | mdadm.h | 3 |
3 files changed, 6 insertions, 2 deletions
@@ -63,8 +63,9 @@ CONFFILEFLAGS = -DCONFFILE=\"$(CONFFILE)\" -DCONFFILE2=\"$(CONFFILE2)\" # If you don't have /lib/init/rw you might want to use /dev/.something # e.g. make ALT_RUN=/dev/.mdadm ALT_RUN = /lib/init/rw +ALT_MAPFILE = map VAR_RUN = /var/run -ALTFLAGS = -DALT_RUN=\"$(ALT_RUN)\" +ALTFLAGS = -DALT_RUN=\"$(ALT_RUN)\" -DALT_MAPFILE=\"$(ALT_MAPFILE)\" VARFLAGS = -DVAR_RUN=\"$(VAR_RUN)\" CFLAGS = $(CWFLAGS) $(CXFLAGS) -DSendmail=\""$(MAILCMD)"\" $(CONFFILEFLAGS) $(ALTFLAGS) $(VARFLAGS) @@ -55,7 +55,7 @@ char *mapname[3][3] = { mapnames(VAR_RUN "/map"), mapnames("/var/run/mdadm.map"), - mapnames(ALT_RUN "/map") + mapnames(ALT_RUN "/" ALT_MAPFILE) }; char *mapdir[3] = { VAR_RUN, NULL, ALT_RUN }; @@ -87,6 +87,9 @@ extern __off64_t lseek64 __P ((int __fd, __off64_t __offset, int __whence)); #ifndef ALT_RUN #define ALT_RUN "/lib/init/rw/mdadm" #endif /* ALT_RUN */ +#ifndef ALT_MAPFILE +#define ALT_MAPFILE "map" +#endif /* ALT_MAPFILE */ #include "md_u.h" #include "md_p.h" |