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;
}