}
static int
-spa_taskq_param_get(zio_type_t t, char *buf)
+spa_taskq_param_get(zio_type_t t, char *buf, boolean_t add_newline)
{
int pos = 0;
sep = " ";
}
- buf[pos++] = '\n';
+ if (add_newline)
+ buf[pos++] = '\n';
buf[pos] = '\0';
return (pos);
static int
spa_taskq_read_param_get(char *buf, zfs_kernel_param_t *kp)
{
- return (spa_taskq_param_get(ZIO_TYPE_READ, buf));
+ return (spa_taskq_param_get(ZIO_TYPE_READ, buf, TRUE));
}
static int
static int
spa_taskq_write_param_get(char *buf, zfs_kernel_param_t *kp)
{
- return (spa_taskq_param_get(ZIO_TYPE_WRITE, buf));
+ return (spa_taskq_param_get(ZIO_TYPE_WRITE, buf, TRUE));
}
#else
/*
char buf[SPA_TASKQ_PARAM_MAX];
int err;
- (void) spa_taskq_param_get(ZIO_TYPE_READ, buf);
+ (void) spa_taskq_param_get(ZIO_TYPE_READ, buf, FALSE);
err = sysctl_handle_string(oidp, buf, sizeof (buf), req);
if (err || req->newptr == NULL)
return (err);
char buf[SPA_TASKQ_PARAM_MAX];
int err;
- (void) spa_taskq_param_get(ZIO_TYPE_WRITE, buf);
+ (void) spa_taskq_param_get(ZIO_TYPE_WRITE, buf, FALSE);
err = sysctl_handle_string(oidp, buf, sizeof (buf), req);
if (err || req->newptr == NULL)
return (err);