if (mdfd < 0) {
/* So... it is up to me to open the device.
* We create a name '/dev/md/XXX' based on the info in the
- * superblock, and call open_mddev on that
+ * superblock, and call create_mddev on that
*/
mdu_array_info_t inf;
char *c;
if (rc < 0)
mdfd = -1;
else
- mdfd = open_mddev(mddev, ident->autof);
+ mdfd = create_mddev(mddev, ident->autof);
if (mdfd < 0) {
st->ss->free_super(st);
free(devices);
devnum = use_partitions ? (-1-devnum) : devnum;
}
- mdfd = open_mddev_devnum(match ? match->devname : mp ? mp->path : NULL,
+ mdfd = create_mddev_devnum(match ? match->devname : mp ? mp->path : NULL,
devnum,
name_to_use,
chosen_name, autof >> 3);
mdu_array_info_t array;
mdu_bitmap_file_t bmf;
struct mdinfo *sra;
- int mdfd = open_mddev_devnum(me->path, me->devnum,
+ int mdfd = create_mddev_devnum(me->path, me->devnum,
NULL, path, 0);
if (mdfd < 0)
continue;
else
devnum = find_free_devnum(usepart);
}
- mdfd = open_mddev_devnum(mp ? mp->path : match ? match->devname : NULL,
+ mdfd = create_mddev_devnum(mp ? mp->path : match ? match->devname : NULL,
devnum, name_to_use,
chosen_name, autof>>3);
}
if (mode == MANAGE || mode == GROW)
autof=1; /* Don't create */
- mdfd = open_mddev(devlist->devname, autof);
+ mdfd = create_mddev(devlist->devname, autof);
if (mdfd < 0)
exit(1);
if ((int)ident.super_minor == -2) {
devlist->devname);
rv |= 1;
} else {
- mdfd = open_mddev(devlist->devname,
+ mdfd = create_mddev(devlist->devname,
array_ident->autof ? array_ident->autof : autof);
if (mdfd < 0)
rv |= 1;
rv |= 1;
continue;
}
- mdfd = open_mddev(dv->devname,
+ mdfd = create_mddev(dv->devname,
array_ident->autof ?array_ident->autof : autof);
if (mdfd < 0) {
rv |= 1;
}
for (; array_list; array_list = array_list->next) {
mdu_array_info_t array;
- mdfd = open_mddev(array_list->devname,
+ mdfd = create_mddev(array_list->devname,
array_list->autof ? array_list->autof : autof);
if (mdfd < 0) {
rv |= 1;
e->dev);
continue;
}
- mdfd = open_mddev(name, 1);
+ mdfd = create_mddev(name, 1);
if (mdfd >= 0) {
if (Manage_runstop(name, mdfd, -1, quiet?1:last?0:-1))
err = 1;
case Waitclean:
rv |= WaitClean(dv->devname, verbose-quiet); continue;
}
- mdfd = open_mddev(dv->devname, 1);
+ mdfd = create_mddev(dv->devname, 1);
if (mdfd>=0) {
switch(dv->disposition) {
case 'R':
extern char DefaultConfFile[];
-extern int open_mddev(char *dev, int autof);
-extern int open_mddev_devnum(char *devname, int devnum, char *name,
+extern int create_mddev(char *dev, int autof);
+extern int create_mddev_devnum(char *devname, int devnum, char *name,
char *chosen_name, int parts);
extern int open_container(int fd);
#ifndef MDASSEMBLE_AUTO
/* from mdopen.c */
-int open_mddev(char *dev, int autof/*unused */)
+int create_mddev(char *dev, int autof/*unused */)
{
int mdfd = open(dev, O_RDWR);
if (mdfd < 0)
} else
for (; array_list; array_list = array_list->next) {
mdu_array_info_t array;
- mdfd = open_mddev(array_list->devname, array_list->autof);
+ mdfd = create_mddev(array_list->devname, array_list->autof);
if (mdfd < 0) {
rv |= 1;
continue;
* If it now doesn't exist, we find a new md array and create the device.
* Default ownership/mode comes from config file.
*/
-int open_mddev(char *dev, int autof)
+int create_mddev(char *dev, int autof)
{
int mdfd;
struct stat stb;
}
-int open_mddev_devnum(char *devname, int devnum, char *name,
+int create_mddev_devnum(char *devname, int devnum, char *name,
char *chosen_name, int parts)
{
/* Open the md device with number 'devnum', possibly using 'devname',