Fix provider's size check for 'insert' command.

Before this fix one was able to insert one sector too small provider.

MFC after:	3 days
This commit is contained in:
pjd 2005-04-25 10:41:26 +00:00
parent cd218c4d5b
commit 93f62be898

View File

@ -367,7 +367,8 @@ g_mirror_ctl_insert(struct gctl_req *req, struct g_class *mp)
gctl_error(req, "Unknown provider %s.", name);
continue;
}
if (sc->sc_provider->mediasize > pp->mediasize) {
if (sc->sc_provider->mediasize >
pp->mediasize - pp->sectorsize) {
gctl_error(req, "Provider %s too small.", name);
continue;
}