Only dump 512 bytes of debugging.

Always wait for things to settle before returning.
This commit is contained in:
Poul-Henning Kamp 2003-07-02 08:07:07 +00:00
parent 68c2a41e6c
commit fd02a4233e
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=117150

View file

@ -266,7 +266,7 @@ gctl_dump(struct gctl_req *req)
} else if (ap->flag & GCTL_PARAM_ASCII) {
printf("\"%s\"", (char *)ap->kvalue);
} else if (ap->len > 0) {
for (j = 0; j < ap->len; j++)
for (j = 0; j < ap->len && j < 512; j++)
printf(" %02x", ((u_char *)ap->kvalue)[j]);
} else {
printf(" = %p", ap->kvalue);
@ -473,6 +473,7 @@ g_ctl_ioctl_ctl(dev_t dev, u_long cmd, caddr_t data, int fflag, struct thread *t
gctl_copyout(req);
}
g_waitidle();
gctl_free(req);
return (req->nerror);
}