mdctl-v0.4.2

This commit is contained in:
Neil Brown 2001-07-26 20:47:22 +00:00
parent 5e52ae9ed0
commit 0db17fcbde
4 changed files with 9 additions and 4 deletions

View File

@ -341,7 +341,7 @@ int Assemble(char *mddev, int mdfd,
/* First, add the raid disks */
for (i=0; i<first_super.raid_disks; i++) {
int j = best[i];
if (devices[j].uptodate) {
if (j >= 0 && devices[j].uptodate) {
mdu_disk_info_t disk;
memset(&disk, 0, sizeof(disk));
disk.major = devices[j].major;

View File

@ -29,7 +29,7 @@
#include "mdctl.h"
char Version[] = Name " - v0.4.1 - 26 July 2001\n";
char Version[] = Name " - v0.4.2 - 27 July 2001\n";
/*
* File: ReadMe.c
*

3
TODO
View File

@ -20,3 +20,6 @@
- when --assemble --scan, if an underlying device is an md device,
then try to assemble that device first.
- mdctl -S /dev/md0 /dev/md1 gives internal error

View File

@ -216,6 +216,7 @@ int devline(char *line)
}
mddev_uuid_t uuidlist = NULL;
mddev_uuid_t *uidlp = &uuidlist;
void arrayline(char *line)
{
@ -254,8 +255,9 @@ void arrayline(char *line)
mu = malloc(sizeof(*mu));
mu->devname = strdup(dev);
memcpy(mu->uuid, uuid, sizeof(uuid));
mu->next = uuidlist;
uuidlist = mu;
mu->next = NULL;
*uidlp = mu;
uidlp = &mu->next;
}
}