From 7d54b385a6dffa8d54af5dcea02a2dbac1efaeaf Mon Sep 17 00:00:00 2001 From: Pawel Jakub Dawidek Date: Tue, 17 Jan 2006 07:32:43 +0000 Subject: [PATCH] - Use better types. - Log problems at level 0 when killing providers. MFC after: 3 days --- sys/geom/eli/g_eli_ctl.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sys/geom/eli/g_eli_ctl.c b/sys/geom/eli/g_eli_ctl.c index b07a2e766991..d5c4b5ac1fd9 100644 --- a/sys/geom/eli/g_eli_ctl.c +++ b/sys/geom/eli/g_eli_ctl.c @@ -164,7 +164,7 @@ g_eli_ctl_detach(struct gctl_req *req, struct g_class *mp) int *force, *last, *nargs, error; const char *prov; char param[16]; - u_int i; + int i; g_topology_assert(); @@ -188,11 +188,11 @@ g_eli_ctl_detach(struct gctl_req *req, struct g_class *mp) return; } - for (i = 0; i < (u_int)*nargs; i++) { - snprintf(param, sizeof(param), "arg%u", i); + for (i = 0; i < *nargs; i++) { + snprintf(param, sizeof(param), "arg%d", i); prov = gctl_get_asciiparam(req, param); if (prov == NULL) { - gctl_error(req, "No 'arg%u' argument.", i); + gctl_error(req, "No 'arg%d' argument.", i); return; } sc = g_eli_find_device(mp, prov); @@ -609,7 +609,7 @@ g_eli_ctl_kill(struct gctl_req *req, struct g_class *mp) int i; for (i = 0; i < *nargs; i++) { - snprintf(param, sizeof(param), "arg%u", i); + snprintf(param, sizeof(param), "arg%d", i); prov = gctl_get_asciiparam(req, param); if (prov == NULL) { G_ELI_DEBUG(0, "No 'arg%d' argument.", i); @@ -618,7 +618,7 @@ g_eli_ctl_kill(struct gctl_req *req, struct g_class *mp) sc = g_eli_find_device(mp, prov); if (sc == NULL) { - G_ELI_DEBUG(1, "No such provider: %s.", prov); + G_ELI_DEBUG(0, "No such provider: %s.", prov); continue; } error = g_eli_kill_one(sc);