Translate the errno to gctl_error() texts.

Spotted by:	mwlucas
This commit is contained in:
Poul-Henning Kamp 2014-11-09 15:52:11 +00:00
parent a52ce850e9
commit cd15a01091

View File

@ -204,6 +204,23 @@ g_bde_create_geom(struct gctl_req *req, struct g_class *mp, struct g_provider *p
if (gp->softc != NULL)
g_free(gp->softc);
g_destroy_geom(gp);
switch (error) {
case ENOENT:
gctl_error(req, "Lock was destroyed");
break;
case ESRCH:
gctl_error(req, "Lock was nuked");
break;
case EINVAL:
gctl_error(req, "Could not open lock");
break;
case ENOTDIR:
gctl_error(req, "Lock not found");
break;
default:
gctl_error(req, "Could not open lock (%d)", error);
break;
}
return;
}