return thread ? 0 : -ENODEV;
}
-/* Initialize a fifos structure with path names. */
-static void _init_fifos(struct dm_event_fifos *fifos)
-{
- fifos->client = -1;
- fifos->server = -1;
-
- fifos->client_path = DM_EVENT_FIFO_CLIENT;
- fifos->server_path = DM_EVENT_FIFO_SERVER;
-}
-
/* Open fifos used for client communication. */
static int _open_fifos(struct dm_event_fifos *fifos)
{
unsigned long env_pid, env_listen_fds;
int r = 0;
- memset(fifos, 0, sizeof(*fifos));
-
/* SD_ACTIVATION must be set! */
if (!(e = getenv(SD_ACTIVATION_ENV_VAR_NAME)) || strcmp(e, "1"))
goto out;
int main(int argc, char *argv[])
{
signed char opt;
- struct dm_event_fifos fifos;
+ struct dm_event_fifos fifos = {
+ .client = -1,
+ .server = -1,
+ .client_path = DM_EVENT_FIFO_CLIENT,
+ .server_path = DM_EVENT_FIFO_SERVER
+ };
int nothreads;
//struct sys_log logdata = {DAEMON_NAME, LOG_DAEMON};
//multilog_init_verbose(std_syslog, _LOG_DEBUG);
//multilog_async(1);
- if (!_systemd_activation)
- _init_fifos(&fifos);
-
pthread_mutex_init(&_global_mutex, NULL);
if (!_systemd_activation && !_open_fifos(&fifos))