- Use better types.

- Log problems at level 0 when killing providers.

MFC after:	3 days
This commit is contained in:
Pawel Jakub Dawidek 2006-01-17 07:32:43 +00:00
parent b5f30223fc
commit 7d54b385a6
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=154463

View File

@ -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);