diff options
author | NeilBrown <neilb@suse.de> | 2008-11-04 00:35:31 +0100 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2008-11-04 00:35:31 +0100 |
commit | 6be1d39d1dafce71c9c7f5bc74ef3fbd30e3765e (patch) | |
tree | d2a72a97977794d6bcfb42402b7e7a0bf4012730 /mdadm.c | |
parent | Rename open_mddev to create_mddev (diff) | |
download | mdadm-6be1d39d1dafce71c9c7f5bc74ef3fbd30e3765e.tar.xz mdadm-6be1d39d1dafce71c9c7f5bc74ef3fbd30e3765e.zip |
Introduce new open_mddev which just does an open.
Some cases we aren't interested in creating the mddev, just opening
it. Make those more explicit.
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'mdadm.c')
-rw-r--r-- | mdadm.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -943,8 +943,9 @@ int main(int argc, char *argv[]) exit(2); } if (mode == MANAGE || mode == GROW) - autof=1; /* Don't create */ - mdfd = create_mddev(devlist->devname, autof); + mdfd = open_mddev(devlist->devname, 1); + else + mdfd = create_mddev(devlist->devname, autof); if (mdfd < 0) exit(1); if ((int)ident.super_minor == -2) { @@ -1242,7 +1243,7 @@ int main(int argc, char *argv[]) e->dev); continue; } - mdfd = create_mddev(name, 1); + mdfd = open_mddev(name, 1); if (mdfd >= 0) { if (Manage_runstop(name, mdfd, -1, quiet?1:last?0:-1)) err = 1; @@ -1279,7 +1280,7 @@ int main(int argc, char *argv[]) case Waitclean: rv |= WaitClean(dv->devname, verbose-quiet); continue; } - mdfd = create_mddev(dv->devname, 1); + mdfd = open_mddev(dv->devname, 1); if (mdfd>=0) { switch(dv->disposition) { case 'R': |