c = fm_printf(d + 1, c, cols, "[ ");
(void) nvpair_value_int8_array(nvp, &val, &nelem);
for (i = 0; i < nelem; i++)
- c = fm_printf(d + 1, c, cols, "0x%llx ",
- (u_longlong_t)val[i]);
+ c = fm_printf(d + 1, c, cols, "0x%llx ",
+ (u_longlong_t)val[i]);
c = fm_printf(d + 1, c, cols, "]");
break;
c = fm_printf(d + 1, c, cols, "[ ");
(void) nvpair_value_uint8_array(nvp, &val, &nelem);
for (i = 0; i < nelem; i++)
- c = fm_printf(d + 1, c, cols, "0x%llx ",
- (u_longlong_t)val[i]);
+ c = fm_printf(d + 1, c, cols, "0x%llx ",
+ (u_longlong_t)val[i]);
c = fm_printf(d + 1, c, cols, "]");
break;
c = fm_printf(d + 1, c, cols, "[ ");
(void) nvpair_value_int16_array(nvp, &val, &nelem);
for (i = 0; i < nelem; i++)
- c = fm_printf(d + 1, c, cols, "0x%llx ",
- (u_longlong_t)val[i]);
+ c = fm_printf(d + 1, c, cols, "0x%llx ",
+ (u_longlong_t)val[i]);
c = fm_printf(d + 1, c, cols, "]");
break;
c = fm_printf(d + 1, c, cols, "[ ");
(void) nvpair_value_uint16_array(nvp, &val, &nelem);
for (i = 0; i < nelem; i++)
- c = fm_printf(d + 1, c, cols, "0x%llx ",
- (u_longlong_t)val[i]);
+ c = fm_printf(d + 1, c, cols, "0x%llx ",
+ (u_longlong_t)val[i]);
c = fm_printf(d + 1, c, cols, "]");
break;
c = fm_printf(d + 1, c, cols, "[ ");
(void) nvpair_value_int32_array(nvp, &val, &nelem);
for (i = 0; i < nelem; i++)
- c = fm_printf(d + 1, c, cols, "0x%llx ",
- (u_longlong_t)val[i]);
+ c = fm_printf(d + 1, c, cols, "0x%llx ",
+ (u_longlong_t)val[i]);
c = fm_printf(d + 1, c, cols, "]");
break;
c = fm_printf(d + 1, c, cols, "[ ");
(void) nvpair_value_uint32_array(nvp, &val, &nelem);
for (i = 0; i < nelem; i++)
- c = fm_printf(d + 1, c, cols, "0x%llx ",
- (u_longlong_t)val[i]);
+ c = fm_printf(d + 1, c, cols, "0x%llx ",
+ (u_longlong_t)val[i]);
c = fm_printf(d + 1, c, cols, "]");
break;
c = fm_printf(d + 1, c, cols, "[ ");
(void) nvpair_value_int64_array(nvp, &val, &nelem);
for (i = 0; i < nelem; i++)
- c = fm_printf(d + 1, c, cols, "0x%llx ",
- (u_longlong_t)val[i]);
+ c = fm_printf(d + 1, c, cols, "0x%llx ",
+ (u_longlong_t)val[i]);
c = fm_printf(d + 1, c, cols, "]");
break;
c = fm_printf(d + 1, c, cols, "[ ");
(void) nvpair_value_uint64_array(nvp, &val, &nelem);
for (i = 0; i < nelem; i++)
- c = fm_printf(d + 1, c, cols, "0x%llx ",
- (u_longlong_t)val[i]);
+ c = fm_printf(d + 1, c, cols, "0x%llx ",
+ (u_longlong_t)val[i]);
c = fm_printf(d + 1, c, cols, "]");
break;
{
zevent_t *ev;
- ev = kmem_zalloc(sizeof(zevent_t), KM_PUSHPAGE);
+ ev = kmem_zalloc(sizeof (zevent_t), KM_PUSHPAGE);
if (ev == NULL)
- return NULL;
+ return (NULL);
- list_create(&ev->ev_ze_list, sizeof(zfs_zevent_t),
+ list_create(&ev->ev_ze_list, sizeof (zfs_zevent_t),
offsetof(zfs_zevent_t, ze_node));
list_link_init(&ev->ev_node);
- return ev;
+ return (ev);
}
static void
ev->ev_cb(ev->ev_nvl, ev->ev_detector);
list_destroy(&ev->ev_ze_list);
- kmem_free(ev, sizeof(zevent_t));
+ kmem_free(ev, sizeof (zevent_t));
}
static void
return;
}
- ev->ev_nvl = nvl;
+ ev->ev_nvl = nvl;
ev->ev_detector = detector;
ev->ev_cb = cb;
file_t *fp;
int error;
- fp = getf(fd);
- if (fp == NULL)
- return (EBADF);
+ fp = getf(fd);
+ if (fp == NULL)
+ return (EBADF);
- *minorp = zfsdev_getminor(fp->f_file);
- error = zfs_zevent_minor_to_state(*minorp, ze);
+ *minorp = zfsdev_getminor(fp->f_file);
+ error = zfs_zevent_minor_to_state(*minorp, ze);
if (error)
zfs_zevent_fd_rele(fd);
*/
int
zfs_zevent_next(zfs_zevent_t *ze, nvlist_t **event, uint64_t *event_size,
- uint64_t *dropped)
+ uint64_t *dropped)
{
zevent_t *ev;
size_t size;
goto out;
}
} else {
- /* Existing stream continue with the next element and remove
- * ourselves from the wait queue for the previous element */
+ /*
+ * Existing stream continue with the next element and remove
+ * ourselves from the wait queue for the previous element
+ */
ev = list_prev(&zevent_list, ze->ze_zevent);
if (ev == NULL) {
error = ENOENT;
out:
mutex_exit(&zevent_lock);
- return error;
+ return (error);
}
int
out:
mutex_exit(&zevent_lock);
- return error;
+ return (error);
}
void
}
mutex_init(&zevent_lock, NULL, MUTEX_DEFAULT, NULL);
- list_create(&zevent_list, sizeof(zevent_t), offsetof(zevent_t, ev_node));
+ list_create(&zevent_list, sizeof (zevent_t),
+ offsetof(zevent_t, ev_node));
cv_init(&zevent_cv, NULL, CV_DEFAULT, NULL);
}