/
githubmirror
/
lvm2
Обзор
Документация
Войти
/
githubmirror
/
lvm2
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
libdaemon/server/daemon-log.h
34 строки
1 KB
Zdenek Kabelac
libdaemon: fix error paths, leaks and bounds checks
11 май 2026, 11:18
11 май 2026, 11:18
be6d63e
Код
Авторство
О чём код?
/* * Copyright (C) 2012 Red Hat, Inc. * * This file is part of LVM2. * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions * of the GNU Lesser General Public License v.2.1. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef LVM_DAEMON_LOG_H #define LVM_DAEMON_LOG_H enum { DAEMON_LOG_FATAL = 0 /* usually preceding daemon death */ , DAEMON_LOG_ERROR = 1 /* something serious has happened */ , DAEMON_LOG_WARN = 2 /* something unusual has happened */ , DAEMON_LOG_INFO = 3 /* thought you might be interested */ , DAEMON_LOG_WIRE = 4 /* dump traffic on client sockets */ , DAEMON_LOG_DEBUG = 5 /* unsorted debug stuff */ , DAEMON_LOG_TYPE_COUNT }; #define DEBUGLOG(s, x...) daemon_logf((s)->log, DAEMON_LOG_DEBUG, x) #define DEBUGLOG_cft(s, prefix, node) daemon_log_cft((s)->log, DAEMON_LOG_DEBUG, prefix, node) #define WARN(s, x...) daemon_logf((s)->log, DAEMON_LOG_WARN, x) #define INFO(s, x...) daemon_logf((s)->log, DAEMON_LOG_INFO, x) #define ERROR(s, x...) daemon_logf((s)->log, DAEMON_LOG_ERROR, x) #define FATAL(s, x...) daemon_logf((s)->log, DAEMON_LOG_FATAL, x) #endif