Accept "sd len 0" and auto-size the subdisk correctly.

Spotted by: csjp
This commit is contained in:
Lukas Ertl 2004-06-23 21:15:55 +00:00
parent 6d90faf3d8
commit b950fbe67b

View File

@ -606,10 +606,8 @@ gv_new_sd(int max, char *token[])
break; break;
} }
s->size = gv_sizespec(token[j]); s->size = gv_sizespec(token[j]);
if (s->size <= 0) { if (s->size <= 0)
errors++; s->size = -1;
break;
}
} else if (!strcmp(token[j], "driveoffset")) { } else if (!strcmp(token[j], "driveoffset")) {
j++; j++;
if (j >= max) { if (j >= max) {