Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 5 Oct 2009 08:44:31 +0000 (UTC)
From:      Ulf Lilleengen <lulf@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r197767 - head/sys/geom/vinum
Message-ID:  <200910050844.n958iVWv005562@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: lulf
Date: Mon Oct  5 08:44:31 2009
New Revision: 197767
URL: http://svn.freebsd.org/changeset/base/197767

Log:
  - Improve error message consistency and wording.

Modified:
  head/sys/geom/vinum/geom_vinum_create.c
  head/sys/geom/vinum/geom_vinum_events.c
  head/sys/geom/vinum/geom_vinum_init.c
  head/sys/geom/vinum/geom_vinum_move.c
  head/sys/geom/vinum/geom_vinum_rm.c
  head/sys/geom/vinum/geom_vinum_subr.c

Modified: head/sys/geom/vinum/geom_vinum_create.c
==============================================================================
--- head/sys/geom/vinum/geom_vinum_create.c	Mon Oct  5 07:21:21 2009	(r197766)
+++ head/sys/geom/vinum/geom_vinum_create.c	Mon Oct  5 08:44:31 2009	(r197767)
@@ -94,7 +94,7 @@ gv_create_drive(struct gv_softc *sc, str
 		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, str
 			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
 	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
 	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
 	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_
 
 	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_
 	}
 
 	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
 	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;
 	}
 

Modified: head/sys/geom/vinum/geom_vinum_events.c
==============================================================================
--- head/sys/geom/vinum/geom_vinum_events.c	Mon Oct  5 07:21:21 2009	(r197766)
+++ head/sys/geom/vinum/geom_vinum_events.c	Mon Oct  5 08:44:31 2009	(r197767)
@@ -193,7 +193,7 @@ gv_drive_lost(struct gv_softc *sc, struc
 	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;
 		}

Modified: head/sys/geom/vinum/geom_vinum_init.c
==============================================================================
--- head/sys/geom/vinum/geom_vinum_init.c	Mon Oct  5 07:21:21 2009	(r197766)
+++ head/sys/geom/vinum/geom_vinum_init.c	Mon Oct  5 08:44:31 2009	(r197767)
@@ -87,7 +87,7 @@ gv_start_obj(struct g_geom *gp, struct g
 		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);
 		}
 	}

Modified: head/sys/geom/vinum/geom_vinum_move.c
==============================================================================
--- head/sys/geom/vinum/geom_vinum_move.c	Mon Oct  5 07:21:21 2009	(r197766)
+++ head/sys/geom/vinum/geom_vinum_move.c	Mon Oct  5 08:44:31 2009	(r197767)
@@ -84,7 +84,7 @@ gv_move(struct g_geom *gp, struct gctl_r
 		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 g
 	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);
 	}

Modified: head/sys/geom/vinum/geom_vinum_rm.c
==============================================================================
--- head/sys/geom/vinum/geom_vinum_rm.c	Mon Oct  5 07:21:21 2009	(r197766)
+++ head/sys/geom/vinum/geom_vinum_rm.c	Mon Oct  5 08:44:31 2009	(r197767)
@@ -207,7 +207,7 @@ gv_rm_vol(struct gv_softc *sc, struct gv
 
 	/* 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 g
 
 	/* 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 
 		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 
 		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();

Modified: head/sys/geom/vinum/geom_vinum_subr.c
==============================================================================
--- head/sys/geom/vinum/geom_vinum_subr.c	Mon Oct  5 07:21:21 2009	(r197766)
+++ head/sys/geom/vinum/geom_vinum_subr.c	Mon Oct  5 08:44:31 2009	(r197767)
@@ -585,7 +585,7 @@ gv_sd_to_drive(struct gv_sd *s, struct g
 				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 g
 
 		/* 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);
 		}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200910050844.n958iVWv005562>