fix if disk has no volume group

This commit is contained in:
Doug MacEachern 2004-12-11 01:10:53 +00:00
parent 7362619bc1
commit 8e420228a1
1 changed files with 6 additions and 2 deletions

View File

@ -1394,8 +1394,12 @@ static int create_diskmap(sigar_t *sigar)
while ((ptr = fgets(buffer, sizeof(buffer), fp))) {
FILE *lfp;
char cmd[256], disk[56];
char *s = strchr(ptr, ' ');
if (s) {
char *s;
if (strstr(ptr, " None")) {
continue; /* no volume group */
}
if ((s = strchr(ptr, ' '))) {
*s = '\0';
}
strcpy(disk, ptr);