4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 * You can obtain a copy of the license from the top-level
9 * OPENSOLARIS.LICENSE or <http://opensource.org/licenses/CDDL-1.0>.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each file
14 * and include the License file from the top-level OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
23 * Developed at Lawrence Livermore National Laboratory (LLNL-CODE-403049).
24 * Copyright (C) 2013-2014 Lawrence Livermore National Security, LLC.
30 #include <libzfs.h> /* FIXME: Replace with libzfs_core. */
36 #include <sys/zfs_ioctl.h>
44 #include "zed_strings.h"
49 * Open the libzfs interface.
52 zed_event_init(struct zed_conf *zcp)
55 zed_log_die("Failed zed_event_init: %s", strerror(EINVAL));
57 zcp->zfs_hdl = libzfs_init();
59 zed_log_die("Failed to initialize libzfs");
61 zcp->zevent_fd = open(ZFS_DEV, O_RDWR);
62 if (zcp->zevent_fd < 0)
63 zed_log_die("Failed to open \"%s\": %s",
64 ZFS_DEV, strerror(errno));
68 * Close the libzfs interface.
71 zed_event_fini(struct zed_conf *zcp)
74 zed_log_die("Failed zed_event_fini: %s", strerror(EINVAL));
76 if (zcp->zevent_fd >= 0) {
77 if (close(zcp->zevent_fd) < 0)
78 zed_log_msg(LOG_WARNING, "Failed to close \"%s\": %s",
79 ZFS_DEV, strerror(errno));
84 libzfs_fini(zcp->zfs_hdl);
90 * Seek to the event specified by [saved_eid] and [saved_etime].
91 * This protects against processing a given event more than once.
92 * Return 0 upon a successful seek to the specified event, or -1 otherwise.
94 * A zevent is considered to be uniquely specified by its (eid,time) tuple.
95 * The unsigned 64b eid is set to 1 when the kernel module is loaded, and
96 * incremented by 1 for each new event. Since the state file can persist
97 * across a kernel module reload, the time must be checked to ensure a match.
100 zed_event_seek(struct zed_conf *zcp, uint64_t saved_eid, int64_t saved_etime[])
112 zed_log_msg(LOG_ERR, "Failed to seek zevent: %s",
118 while ((eid < saved_eid) && !found) {
119 rv = zpool_events_next(zcp->zfs_hdl, &nvl, &n_dropped,
120 ZEVENT_NONBLOCK, zcp->zevent_fd);
122 if ((rv != 0) || !nvl)
126 zed_log_msg(LOG_WARNING, "Missed %d events", n_dropped);
128 * FIXME: Increase max size of event nvlist in
129 * /sys/module/zfs/parameters/zfs_zevent_len_max ?
132 if (nvlist_lookup_uint64(nvl, "eid", &eid) != 0) {
133 zed_log_msg(LOG_WARNING, "Failed to lookup zevent eid");
134 } else if (nvlist_lookup_int64_array(nvl, "time",
135 &etime, &nelem) != 0) {
136 zed_log_msg(LOG_WARNING,
137 "Failed to lookup zevent time (eid=%llu)", eid);
138 } else if (nelem != 2) {
139 zed_log_msg(LOG_WARNING,
140 "Failed to lookup zevent time (eid=%llu, nelem=%u)",
142 } else if ((eid != saved_eid) ||
143 (etime[0] != saved_etime[0]) ||
144 (etime[1] != saved_etime[1])) {
151 if (!found && (saved_eid > 0)) {
152 if (zpool_events_seek(zcp->zfs_hdl, ZEVENT_SEEK_START,
154 zed_log_msg(LOG_WARNING, "Failed to seek to eid=0");
158 zed_log_msg(LOG_NOTICE, "Processing events since eid=%llu", eid);
159 return (found ? 0 : -1);
163 * Return non-zero if nvpair [name] should be formatted in hex; o/w, return 0.
166 _zed_event_value_is_hex(const char *name)
168 const char *hex_suffix[] = {
179 for (pp = hex_suffix; *pp; pp++) {
180 p = strstr(name, *pp);
181 if (p && strlen(p) == strlen(*pp))
188 * Add an environment variable for [eid] to the container [zsp].
190 * The variable name is the concatenation of [prefix] and [name] converted to
191 * uppercase with non-alphanumeric characters converted to underscores;
192 * [prefix] is optional, and [name] must begin with an alphabetic character.
193 * If the converted variable name already exists within the container [zsp],
194 * its existing value will be replaced with the new value.
196 * The variable value is specified by the format string [fmt].
198 * Returns 0 on success, and -1 on error (with errno set).
200 * All environment variables in [zsp] should be added through this function.
203 _zed_event_add_var(uint64_t eid, zed_strings_t *zsp,
204 const char *prefix, const char *name, const char *fmt, ...)
220 zed_log_msg(LOG_WARNING,
221 "Failed to add variable for eid=%llu: Name is empty", eid);
223 } else if (!isalpha(name[0])) {
225 zed_log_msg(LOG_WARNING,
226 "Failed to add variable for eid=%llu: "
227 "Name \"%s\" is invalid", eid, name);
231 * Construct the string key by converting PREFIX (if present) and NAME.
234 lastp = keybuf + sizeof (keybuf);
236 for (srcp = prefix; *srcp && (dstp < lastp); srcp++)
237 *dstp++ = isalnum(*srcp) ? toupper(*srcp) : '_';
239 for (srcp = name; *srcp && (dstp < lastp); srcp++)
240 *dstp++ = isalnum(*srcp) ? toupper(*srcp) : '_';
243 errno = ENAMETOOLONG;
244 zed_log_msg(LOG_WARNING,
245 "Failed to add variable for eid=%llu: Name too long", eid);
250 * Construct the string specified by "[PREFIX][NAME]=[FMT]".
253 buflen = sizeof (valbuf);
254 n = strlcpy(dstp, keybuf, buflen);
255 if (n >= sizeof (valbuf)) {
257 zed_log_msg(LOG_WARNING, "Failed to add %s for eid=%llu: %s",
258 keybuf, eid, "Exceeded buffer size");
267 va_start(vargs, fmt);
268 n = vsnprintf(dstp, buflen, fmt, vargs);
271 if ((n < 0) || (n >= buflen)) {
273 zed_log_msg(LOG_WARNING, "Failed to add %s for eid=%llu: %s",
274 keybuf, eid, "Exceeded buffer size");
276 } else if (zed_strings_add(zsp, keybuf, valbuf) < 0) {
277 zed_log_msg(LOG_WARNING, "Failed to add %s for eid=%llu: %s",
278 keybuf, eid, strerror(errno));
285 _zed_event_add_array_err(uint64_t eid, const char *name)
288 zed_log_msg(LOG_WARNING,
289 "Failed to convert nvpair \"%s\" for eid=%llu: "
290 "Exceeded buffer size", name, eid);
295 _zed_event_add_int8_array(uint64_t eid, zed_strings_t *zsp,
296 const char *prefix, nvpair_t *nvp)
299 int buflen = sizeof (buf);
307 assert((nvp != NULL) && (nvpair_type(nvp) == DATA_TYPE_INT8_ARRAY));
309 name = nvpair_name(nvp);
310 (void) nvpair_value_int8_array(nvp, &i8p, &nelem);
311 for (i = 0, p = buf; (i < nelem) && (buflen > 0); i++) {
312 n = snprintf(p, buflen, "%d ", i8p[i]);
313 if ((n < 0) || (n >= buflen))
314 return (_zed_event_add_array_err(eid, name));
321 return (_zed_event_add_var(eid, zsp, prefix, name, "%s", buf));
325 _zed_event_add_uint8_array(uint64_t eid, zed_strings_t *zsp,
326 const char *prefix, nvpair_t *nvp)
329 int buflen = sizeof (buf);
337 assert((nvp != NULL) && (nvpair_type(nvp) == DATA_TYPE_UINT8_ARRAY));
339 name = nvpair_name(nvp);
340 (void) nvpair_value_uint8_array(nvp, &u8p, &nelem);
341 for (i = 0, p = buf; (i < nelem) && (buflen > 0); i++) {
342 n = snprintf(p, buflen, "%u ", u8p[i]);
343 if ((n < 0) || (n >= buflen))
344 return (_zed_event_add_array_err(eid, name));
351 return (_zed_event_add_var(eid, zsp, prefix, name, "%s", buf));
355 _zed_event_add_int16_array(uint64_t eid, zed_strings_t *zsp,
356 const char *prefix, nvpair_t *nvp)
359 int buflen = sizeof (buf);
367 assert((nvp != NULL) && (nvpair_type(nvp) == DATA_TYPE_INT16_ARRAY));
369 name = nvpair_name(nvp);
370 (void) nvpair_value_int16_array(nvp, &i16p, &nelem);
371 for (i = 0, p = buf; (i < nelem) && (buflen > 0); i++) {
372 n = snprintf(p, buflen, "%d ", i16p[i]);
373 if ((n < 0) || (n >= buflen))
374 return (_zed_event_add_array_err(eid, name));
381 return (_zed_event_add_var(eid, zsp, prefix, name, "%s", buf));
385 _zed_event_add_uint16_array(uint64_t eid, zed_strings_t *zsp,
386 const char *prefix, nvpair_t *nvp)
389 int buflen = sizeof (buf);
397 assert((nvp != NULL) && (nvpair_type(nvp) == DATA_TYPE_UINT16_ARRAY));
399 name = nvpair_name(nvp);
400 (void) nvpair_value_uint16_array(nvp, &u16p, &nelem);
401 for (i = 0, p = buf; (i < nelem) && (buflen > 0); i++) {
402 n = snprintf(p, buflen, "%u ", u16p[i]);
403 if ((n < 0) || (n >= buflen))
404 return (_zed_event_add_array_err(eid, name));
411 return (_zed_event_add_var(eid, zsp, prefix, name, "%s", buf));
415 _zed_event_add_int32_array(uint64_t eid, zed_strings_t *zsp,
416 const char *prefix, nvpair_t *nvp)
419 int buflen = sizeof (buf);
427 assert((nvp != NULL) && (nvpair_type(nvp) == DATA_TYPE_INT32_ARRAY));
429 name = nvpair_name(nvp);
430 (void) nvpair_value_int32_array(nvp, &i32p, &nelem);
431 for (i = 0, p = buf; (i < nelem) && (buflen > 0); i++) {
432 n = snprintf(p, buflen, "%d ", i32p[i]);
433 if ((n < 0) || (n >= buflen))
434 return (_zed_event_add_array_err(eid, name));
441 return (_zed_event_add_var(eid, zsp, prefix, name, "%s", buf));
445 _zed_event_add_uint32_array(uint64_t eid, zed_strings_t *zsp,
446 const char *prefix, nvpair_t *nvp)
449 int buflen = sizeof (buf);
457 assert((nvp != NULL) && (nvpair_type(nvp) == DATA_TYPE_UINT32_ARRAY));
459 name = nvpair_name(nvp);
460 (void) nvpair_value_uint32_array(nvp, &u32p, &nelem);
461 for (i = 0, p = buf; (i < nelem) && (buflen > 0); i++) {
462 n = snprintf(p, buflen, "%u ", u32p[i]);
463 if ((n < 0) || (n >= buflen))
464 return (_zed_event_add_array_err(eid, name));
471 return (_zed_event_add_var(eid, zsp, prefix, name, "%s", buf));
475 _zed_event_add_int64_array(uint64_t eid, zed_strings_t *zsp,
476 const char *prefix, nvpair_t *nvp)
479 int buflen = sizeof (buf);
487 assert((nvp != NULL) && (nvpair_type(nvp) == DATA_TYPE_INT64_ARRAY));
489 name = nvpair_name(nvp);
490 (void) nvpair_value_int64_array(nvp, &i64p, &nelem);
491 for (i = 0, p = buf; (i < nelem) && (buflen > 0); i++) {
492 n = snprintf(p, buflen, "%lld ", (u_longlong_t) i64p[i]);
493 if ((n < 0) || (n >= buflen))
494 return (_zed_event_add_array_err(eid, name));
501 return (_zed_event_add_var(eid, zsp, prefix, name, "%s", buf));
505 _zed_event_add_uint64_array(uint64_t eid, zed_strings_t *zsp,
506 const char *prefix, nvpair_t *nvp)
509 int buflen = sizeof (buf);
518 assert((nvp != NULL) && (nvpair_type(nvp) == DATA_TYPE_UINT64_ARRAY));
520 name = nvpair_name(nvp);
521 fmt = _zed_event_value_is_hex(name) ? "0x%.16llX " : "%llu ";
522 (void) nvpair_value_uint64_array(nvp, &u64p, &nelem);
523 for (i = 0, p = buf; (i < nelem) && (buflen > 0); i++) {
524 n = snprintf(p, buflen, fmt, (u_longlong_t) u64p[i]);
525 if ((n < 0) || (n >= buflen))
526 return (_zed_event_add_array_err(eid, name));
533 return (_zed_event_add_var(eid, zsp, prefix, name, "%s", buf));
537 _zed_event_add_string_array(uint64_t eid, zed_strings_t *zsp,
538 const char *prefix, nvpair_t *nvp)
541 int buflen = sizeof (buf);
549 assert((nvp != NULL) && (nvpair_type(nvp) == DATA_TYPE_STRING_ARRAY));
551 name = nvpair_name(nvp);
552 (void) nvpair_value_string_array(nvp, &strp, &nelem);
553 for (i = 0, p = buf; (i < nelem) && (buflen > 0); i++) {
554 n = snprintf(p, buflen, "%s ", strp[i] ? strp[i] : "<NULL>");
555 if ((n < 0) || (n >= buflen))
556 return (_zed_event_add_array_err(eid, name));
563 return (_zed_event_add_var(eid, zsp, prefix, name, "%s", buf));
567 * Convert the nvpair [nvp] to a string which is added to the environment
568 * of the child process.
569 * Return 0 on success, -1 on error.
571 * FIXME: Refactor with cmd/zpool/zpool_main.c:zpool_do_events_nvprint()?
574 _zed_event_add_nvpair(uint64_t eid, zed_strings_t *zsp, nvpair_t *nvp)
578 const char *prefix = ZEVENT_VAR_PREFIX;
590 name = nvpair_name(nvp);
591 type = nvpair_type(nvp);
594 case DATA_TYPE_BOOLEAN:
595 _zed_event_add_var(eid, zsp, prefix, name, "%s", "1");
597 case DATA_TYPE_BOOLEAN_VALUE:
598 (void) nvpair_value_boolean_value(nvp, &b);
599 _zed_event_add_var(eid, zsp, prefix, name, "%s", b ? "1" : "0");
602 (void) nvpair_value_byte(nvp, &i8);
603 _zed_event_add_var(eid, zsp, prefix, name, "%d", i8);
606 (void) nvpair_value_int8(nvp, (int8_t *) &i8);
607 _zed_event_add_var(eid, zsp, prefix, name, "%d", i8);
609 case DATA_TYPE_UINT8:
610 (void) nvpair_value_uint8(nvp, &i8);
611 _zed_event_add_var(eid, zsp, prefix, name, "%u", i8);
613 case DATA_TYPE_INT16:
614 (void) nvpair_value_int16(nvp, (int16_t *) &i16);
615 _zed_event_add_var(eid, zsp, prefix, name, "%d", i16);
617 case DATA_TYPE_UINT16:
618 (void) nvpair_value_uint16(nvp, &i16);
619 _zed_event_add_var(eid, zsp, prefix, name, "%u", i16);
621 case DATA_TYPE_INT32:
622 (void) nvpair_value_int32(nvp, (int32_t *) &i32);
623 _zed_event_add_var(eid, zsp, prefix, name, "%d", i32);
625 case DATA_TYPE_UINT32:
626 (void) nvpair_value_uint32(nvp, &i32);
627 _zed_event_add_var(eid, zsp, prefix, name, "%u", i32);
629 case DATA_TYPE_INT64:
630 (void) nvpair_value_int64(nvp, (int64_t *) &i64);
631 _zed_event_add_var(eid, zsp, prefix, name,
632 "%lld", (longlong_t) i64);
634 case DATA_TYPE_UINT64:
635 (void) nvpair_value_uint64(nvp, &i64);
636 _zed_event_add_var(eid, zsp, prefix, name,
637 (_zed_event_value_is_hex(name) ? "0x%.16llX" : "%llu"),
640 case DATA_TYPE_DOUBLE:
641 (void) nvpair_value_double(nvp, &d);
642 _zed_event_add_var(eid, zsp, prefix, name, "%g", d);
644 case DATA_TYPE_HRTIME:
645 (void) nvpair_value_hrtime(nvp, (hrtime_t *) &i64);
646 _zed_event_add_var(eid, zsp, prefix, name,
647 "%llu", (u_longlong_t) i64);
649 case DATA_TYPE_NVLIST:
650 _zed_event_add_var(eid, zsp, prefix, name,
651 "%s", "_NOT_IMPLEMENTED_"); /* FIXME */
653 case DATA_TYPE_STRING:
654 (void) nvpair_value_string(nvp, &str);
655 _zed_event_add_var(eid, zsp, prefix, name,
656 "%s", (str ? str : "<NULL>"));
658 case DATA_TYPE_BOOLEAN_ARRAY:
659 _zed_event_add_var(eid, zsp, prefix, name,
660 "%s", "_NOT_IMPLEMENTED_"); /* FIXME */
662 case DATA_TYPE_BYTE_ARRAY:
663 _zed_event_add_var(eid, zsp, prefix, name,
664 "%s", "_NOT_IMPLEMENTED_"); /* FIXME */
666 case DATA_TYPE_INT8_ARRAY:
667 _zed_event_add_int8_array(eid, zsp, prefix, nvp);
669 case DATA_TYPE_UINT8_ARRAY:
670 _zed_event_add_uint8_array(eid, zsp, prefix, nvp);
672 case DATA_TYPE_INT16_ARRAY:
673 _zed_event_add_int16_array(eid, zsp, prefix, nvp);
675 case DATA_TYPE_UINT16_ARRAY:
676 _zed_event_add_uint16_array(eid, zsp, prefix, nvp);
678 case DATA_TYPE_INT32_ARRAY:
679 _zed_event_add_int32_array(eid, zsp, prefix, nvp);
681 case DATA_TYPE_UINT32_ARRAY:
682 _zed_event_add_uint32_array(eid, zsp, prefix, nvp);
684 case DATA_TYPE_INT64_ARRAY:
685 _zed_event_add_int64_array(eid, zsp, prefix, nvp);
687 case DATA_TYPE_UINT64_ARRAY:
688 _zed_event_add_uint64_array(eid, zsp, prefix, nvp);
690 case DATA_TYPE_STRING_ARRAY:
691 _zed_event_add_string_array(eid, zsp, prefix, nvp);
693 case DATA_TYPE_NVLIST_ARRAY:
694 _zed_event_add_var(eid, zsp, prefix, name,
695 "%s", "_NOT_IMPLEMENTED_"); /* FIXME */
699 zed_log_msg(LOG_WARNING,
700 "Failed to convert nvpair \"%s\" for eid=%llu: "
701 "Unrecognized type=%u", name, eid, (unsigned int) type);
707 * Restrict various environment variables to safe and sane values
708 * when constructing the environment for the child process.
710 * Reference: Secure Programming Cookbook by Viega & Messier, Section 1.1.
713 _zed_event_add_env_restrict(uint64_t eid, zed_strings_t *zsp)
715 const char *env_restrict[][2] = {
717 { "PATH", _PATH_STDPATH },
718 { "ZDB", SBINDIR "/zdb" },
719 { "ZED", SBINDIR "/zed" },
720 { "ZFS", SBINDIR "/zfs" },
721 { "ZINJECT", SBINDIR "/zinject" },
722 { "ZPOOL", SBINDIR "/zpool" },
723 { "ZFS_ALIAS", ZFS_META_ALIAS },
724 { "ZFS_VERSION", ZFS_META_VERSION },
725 { "ZFS_RELEASE", ZFS_META_RELEASE },
728 const char *(*pa)[2];
732 for (pa = env_restrict; *(*pa); pa++) {
733 _zed_event_add_var(eid, zsp, NULL, (*pa)[0], "%s", (*pa)[1]);
738 * Preserve specified variables from the parent environment
739 * when constructing the environment for the child process.
741 * Reference: Secure Programming Cookbook by Viega & Messier, Section 1.1.
744 _zed_event_add_env_preserve(uint64_t eid, zed_strings_t *zsp)
746 const char *env_preserve[] = {
755 for (keyp = env_preserve; *keyp; keyp++) {
756 if ((val = getenv(*keyp)))
757 _zed_event_add_var(eid, zsp, NULL, *keyp, "%s", val);
762 * Compute the "subclass" by removing the first 3 components of [class]
763 * (which seem to always be either "ereport.fs.zfs" or "resource.fs.zfs").
764 * Return a pointer inside the string [class], or NULL if insufficient
768 _zed_event_get_subclass(const char *class)
777 for (i = 0; i < 3; i++) {
787 * Convert the zevent time from a 2-element array of 64b integers
788 * into a more convenient form:
789 * - TIME_SECS is the second component of the time.
790 * - TIME_NSECS is the nanosecond component of the time.
791 * - TIME_STRING is an almost-RFC3339-compliant string representation.
794 _zed_event_add_time_strings(uint64_t eid, zed_strings_t *zsp, int64_t etime[])
800 assert(etime != NULL);
802 _zed_event_add_var(eid, zsp, ZEVENT_VAR_PREFIX, "TIME_SECS",
803 "%lld", (long long int) etime[0]);
804 _zed_event_add_var(eid, zsp, ZEVENT_VAR_PREFIX, "TIME_NSECS",
805 "%lld", (long long int) etime[1]);
807 if (!(stp = localtime((const time_t *) &etime[0]))) {
808 zed_log_msg(LOG_WARNING, "Failed to add %s%s for eid=%llu: %s",
809 ZEVENT_VAR_PREFIX, "TIME_STRING", eid, "localtime error");
810 } else if (!strftime(buf, sizeof (buf), "%Y-%m-%d %H:%M:%S%z", stp)) {
811 zed_log_msg(LOG_WARNING, "Failed to add %s%s for eid=%llu: %s",
812 ZEVENT_VAR_PREFIX, "TIME_STRING", eid, "strftime error");
814 _zed_event_add_var(eid, zsp, ZEVENT_VAR_PREFIX, "TIME_STRING",
820 * Service the next zevent, blocking until one is available.
823 zed_event_service(struct zed_conf *zcp)
833 const char *subclass;
838 zed_log_msg(LOG_ERR, "Failed to service zevent: %s",
842 rv = zpool_events_next(zcp->zfs_hdl, &nvl, &n_dropped, ZEVENT_NONE,
845 if ((rv != 0) || !nvl)
849 zed_log_msg(LOG_WARNING, "Missed %d events", n_dropped);
851 * FIXME: Increase max size of event nvlist in
852 * /sys/module/zfs/parameters/zfs_zevent_len_max ?
855 if (nvlist_lookup_uint64(nvl, "eid", &eid) != 0) {
856 zed_log_msg(LOG_WARNING, "Failed to lookup zevent eid");
857 } else if (nvlist_lookup_int64_array(
858 nvl, "time", &etime, &nelem) != 0) {
859 zed_log_msg(LOG_WARNING,
860 "Failed to lookup zevent time (eid=%llu)", eid);
861 } else if (nelem != 2) {
862 zed_log_msg(LOG_WARNING,
863 "Failed to lookup zevent time (eid=%llu, nelem=%u)",
865 } else if (nvlist_lookup_string(nvl, "class", &class) != 0) {
866 zed_log_msg(LOG_WARNING,
867 "Failed to lookup zevent class (eid=%llu)", eid);
869 zsp = zed_strings_create();
872 while ((nvp = nvlist_next_nvpair(nvl, nvp)))
873 _zed_event_add_nvpair(eid, zsp, nvp);
875 _zed_event_add_env_restrict(eid, zsp);
876 _zed_event_add_env_preserve(eid, zsp);
878 _zed_event_add_var(eid, zsp, ZED_VAR_PREFIX, "PID",
879 "%d", (int) getpid());
880 _zed_event_add_var(eid, zsp, ZED_VAR_PREFIX, "ZEDLET_DIR",
881 "%s", zcp->zedlet_dir);
882 subclass = _zed_event_get_subclass(class);
883 _zed_event_add_var(eid, zsp, ZEVENT_VAR_PREFIX, "SUBCLASS",
884 "%s", (subclass ? subclass : class));
885 _zed_event_add_time_strings(eid, zsp, etime);
887 zed_exec_process(eid, class, subclass,
888 zcp->zedlet_dir, zcp->zedlets, zsp, zcp->zevent_fd);
890 zed_conf_write_state(zcp, eid, etime);
892 zed_strings_destroy(zsp);