- Improve error message consistency and wording.

This commit is contained in:
Ulf Lilleengen 2009-10-05 08:44:31 +00:00
parent d5060740e3
commit a8a3cd7d9d
6 changed files with 21 additions and 21 deletions

View File

@ -94,7 +94,7 @@ gv_create_drive(struct gv_softc *sc, struct gv_drive *d)
if (g_attach(cp, pp) != 0) {
g_destroy_consumer(cp);
g_topology_unlock();
G_VINUM_DEBUG(0, "create drive '%s': couldn't attach",
G_VINUM_DEBUG(0, "create drive '%s': unable to attach",
d->name);
g_free(d);
return (GV_ERR_CREATE);
@ -135,7 +135,7 @@ gv_create_drive(struct gv_softc *sc, struct gv_drive *d)
g_detach(cp);
g_destroy_consumer(cp);
g_topology_unlock();
G_VINUM_DEBUG(0, "create drive '%s': couldn't update "
G_VINUM_DEBUG(0, "create drive '%s': unable to update "
"access counts", d->name);
if (d->hdr != NULL)
g_free(d->hdr);
@ -320,7 +320,7 @@ gv_concat(struct g_geom *gp, struct gctl_req *req)
dcount = 0;
vol = gctl_get_param(req, "name", NULL);
if (vol == NULL) {
gctl_error(req, "volume names not given");
gctl_error(req, "volume name not given");
return;
}
@ -388,7 +388,7 @@ gv_mirror(struct g_geom *gp, struct gctl_req *req)
pcount = 0;
vol = gctl_get_param(req, "name", NULL);
if (vol == NULL) {
gctl_error(req, "volume's not given");
gctl_error(req, "volume name not given");
return;
}
@ -396,7 +396,7 @@ gv_mirror(struct g_geom *gp, struct gctl_req *req)
drives = gctl_get_paraml(req, "drives", sizeof(*drives));
if (drives == NULL) {
gctl_error(req, "drives not given");
gctl_error(req, "drive names not given");
return;
}
@ -480,7 +480,7 @@ gv_raid5(struct g_geom *gp, struct gctl_req *req)
vol = gctl_get_param(req, "name", NULL);
if (vol == NULL) {
gctl_error(req, "volume's not given");
gctl_error(req, "volume name not given");
return;
}
flags = gctl_get_paraml(req, "flags", sizeof(*flags));
@ -493,7 +493,7 @@ gv_raid5(struct g_geom *gp, struct gctl_req *req)
}
if (drives == NULL) {
gctl_error(req, "drives not given");
gctl_error(req, "drive names not given");
return;
}
@ -558,14 +558,14 @@ gv_stripe(struct g_geom *gp, struct gctl_req *req)
pcount = 0;
vol = gctl_get_param(req, "name", NULL);
if (vol == NULL) {
gctl_error(req, "volume's not given");
gctl_error(req, "volume name not given");
return;
}
flags = gctl_get_paraml(req, "flags", sizeof(*flags));
drives = gctl_get_paraml(req, "drives", sizeof(*drives));
if (drives == NULL) {
gctl_error(req, "drives not given");
gctl_error(req, "drive names not given");
return;
}

View File

@ -193,7 +193,7 @@ gv_drive_lost(struct gv_softc *sc, struct gv_drive *d)
if (cp != NULL) {
if (cp->nstart != cp->nend) {
G_VINUM_DEBUG(0, "dead drive '%s' has still active "
"requests, can't detach consumer", d->name);
"requests, unable to detach consumer", d->name);
gv_post_event(sc, GV_EVENT_DRIVE_LOST, d, NULL, 0, 0);
return;
}

View File

@ -87,7 +87,7 @@ gv_start_obj(struct g_geom *gp, struct gctl_req *req)
case GV_TYPE_SD:
case GV_TYPE_DRIVE:
/* XXX Not implemented, but what is the use? */
gctl_error(req, "cannot start '%s' - not yet supported",
gctl_error(req, "unable to start '%s' - not yet supported",
argv);
return;
default:
@ -279,8 +279,8 @@ gv_rebuild_plex(struct gv_plex *p)
LIST_FOREACH(s, &p->subdisks, in_plex) {
d = s->drive_sc;
if (d == NULL || (d->flags & GV_DRIVE_REFERENCED)) {
G_VINUM_DEBUG(0, "can't rebuild %s, subdisk(s) have no "
"drives", p->name);
G_VINUM_DEBUG(0, "unable to rebuild %s, subdisk(s) have"
" no drives", p->name);
return (ENXIO);
}
}

View File

@ -84,7 +84,7 @@ gv_move(struct g_geom *gp, struct gctl_req *req)
type = gv_object_type(sc, object);
if (type != GV_TYPE_SD) {
gctl_error(req, "you can only move subdisks; "
"'%s' isn't one", object);
"'%s' is not a subdisk", object);
return;
}
@ -145,7 +145,7 @@ gv_move_sd(struct gv_softc *sc, struct gv_sd *cursd,
err = gv_set_sd_state(cursd, GV_SD_STALE,
GV_SETSTATE_FORCE | GV_SETSTATE_CONFIG);
if (err) {
G_VINUM_DEBUG(0, "could not set the subdisk '%s' to state "
G_VINUM_DEBUG(0, "unable to set the subdisk '%s' to state "
"'stale'", cursd->name);
return (err);
}

View File

@ -207,7 +207,7 @@ gv_rm_vol(struct gv_softc *sc, struct gv_volume *v)
/* Check if any of our consumers is open. */
if (gv_provider_is_open(pp)) {
G_VINUM_DEBUG(0, "Unable to remove %s: volume still in use",
G_VINUM_DEBUG(0, "unable to remove %s: volume still in use",
v->name);
return;
}
@ -241,7 +241,7 @@ gv_rm_plex(struct gv_softc *sc, struct gv_plex *p)
/* Check if any of our consumers is open. */
if (v != NULL && gv_provider_is_open(v->provider) && v->plexcount < 2) {
G_VINUM_DEBUG(0, "Unable to remove %s: volume still in use",
G_VINUM_DEBUG(0, "unable to remove %s: volume still in use",
p->name);
return;
}
@ -318,7 +318,7 @@ gv_rm_drive(struct gv_softc *sc, struct gv_drive *d, int flags)
g_topology_unlock();
if (err) {
G_VINUM_DEBUG(0, "%s: couldn't access '%s', "
G_VINUM_DEBUG(0, "%s: unable to access '%s', "
"errno: %d", __func__, cp->provider->name, err);
return;
}
@ -327,7 +327,7 @@ gv_rm_drive(struct gv_softc *sc, struct gv_drive *d, int flags)
d->hdr->magic = GV_NOMAGIC;
err = gv_write_header(cp, d->hdr);
if (err)
G_VINUM_DEBUG(0, "gv_rm_drive: couldn't write header to"
G_VINUM_DEBUG(0, "gv_rm_drive: error writing header to"
" '%s', errno: %d", cp->provider->name, err);
g_topology_lock();

View File

@ -585,7 +585,7 @@ gv_sd_to_drive(struct gv_sd *s, struct gv_drive *d)
return (0);
}
} else {
G_VINUM_DEBUG(0, "can't give sd '%s' to '%s' "
G_VINUM_DEBUG(0, "error giving subdisk '%s' to '%s' "
"(already on '%s')", s->name, d->name,
s->drive_sc->name);
return (GV_ERR_ISATTACHED);
@ -612,7 +612,7 @@ gv_sd_to_drive(struct gv_sd *s, struct gv_drive *d)
/* No good slot found? */
if (s->size == -1) {
G_VINUM_DEBUG(0, "couldn't autosize '%s' on '%s'",
G_VINUM_DEBUG(0, "unable to autosize '%s' on '%s'",
s->name, d->name);
return (GV_ERR_BADSIZE);
}