Changeset View
Changeset View
Standalone View
Standalone View
head/sys/dev/ntb/test/ntb_tool.c
Show First 20 Lines • Show All 378 Lines • ▼ Show 20 Lines | get_ubuf(struct sysctl_req *req, char *ubuf) | ||||
ubuf[req->newlen] = '\0'; | ubuf[req->newlen] = '\0'; | ||||
return (0); | return (0); | ||||
} | } | ||||
static int | static int | ||||
read_out(struct sysctl_req *req, uint64_t val) | read_out(struct sysctl_req *req, uint64_t val) | ||||
{ | { | ||||
char ubuf[16]; | char ubuf[19]; | ||||
memset((void *)ubuf, 0, sizeof(ubuf)); | memset((void *)ubuf, 0, sizeof(ubuf)); | ||||
snprintf(ubuf, sizeof(ubuf), "0x%jx", val); | snprintf(ubuf, sizeof(ubuf), "0x%jx", val); | ||||
return SYSCTL_OUT(req, ubuf, sizeof(ubuf)); | return SYSCTL_OUT(req, ubuf, sizeof(ubuf)); | ||||
} | } | ||||
static int | static int | ||||
▲ Show 20 Lines • Show All 1,100 Lines • Show Last 20 Lines |