From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on sa.local.altlinux.org X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684600704; x=1687192704; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=+zFmAihOE6qSXwqLTJ6XY74n3hHUPTC06RMxFrp4rhQ=; b=NqnJ6XyyyNW/h96Ty49NziQFFyZnjzZHzYqyMmWXFPpFbaYP42Om67eGoApBGb3qun W8IxFtQ0aMs4+3hp9AEfngqUQQat4asZed5U1AuH6j7K76UdAAhtF+HkakOpemSwkFRo 0A7+k5a0AOZoB7lNw5+SBl0dCPcsGDiBu94QMCs9uvKyDC+1qMXtKRRA+7ApS5wg5iyG P173/FBP71st3cx6hFp1JBDnsbh4qSw+VQ76PdqIVBiEI78VZJRQTw56UCbvXyXXouvZ ciRar+UNWhAvmBkadJpBlEbRyNGgQoam+8Lma2nZEgke19RR39deB+4pN3h1KRUrKHE3 1e0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684600704; x=1687192704; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=+zFmAihOE6qSXwqLTJ6XY74n3hHUPTC06RMxFrp4rhQ=; b=Xkn5gRCCIBgQrodbwOMWVo9Qy5EUVUYbl6UvqEHqUNybqMwtW4IYgNgiwTvTbjOmu3 w5S98ER/eZM3nr9gphsDr3D1XmIgaWGiCnfQEyEGS5Vpk7Ezn59W2Ox0JM70f1dtJvKT OPBFLvrZ4a2PlmFq3cTXLdfGY+hfhwZTyV55Ikhvm1ZNQr2mgpOK+Iva3G/qrDC59Pj0 Abm7lXi1ivqodNMlO1qj+ZtUppx7YzunfJ+lGYmb4l5XNZ5RLEWVvv4Qoa7Oj8YBKsfc +ebj0HqmayJlcO1nrjRTNWTlw7Yihz6ZOAYj5yt0pKjnja52m+HhmAn4eXDJyBKhin87 +sHg== X-Gm-Message-State: AC+VfDyi07DkBiyZdGQszUkkd7Tzql7xZpkUj8hw7/aPqDZhR7SSlq1Y w8H1dW/OoyWedlz1IaWAZoDZBQWd8XA= X-Google-Smtp-Source: ACHHUZ7c2b9JrAXgUJxDLOwZBo/ZMLqXwaRAQeK50cMxGqoEk6r/XdsJ7wVv82fX6qqieLJ72Eij5A== X-Received: by 2002:a7b:cd0a:0:b0:3f4:2d75:72e8 with SMTP id f10-20020a7bcd0a000000b003f42d7572e8mr3859669wmj.28.1684600704071; Sat, 20 May 2023 09:38:24 -0700 (PDT) From: Alexey Gladkov To: make-initrd@lists.altlinux.org Date: Sat, 20 May 2023 18:37:48 +0200 Message-Id: <20230520163748.177260-3-gladkov.alexey@gmail.com> X-Mailer: git-send-email 2.33.8 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [make-initrd] [PATCH 3/3] ueventd: Drop obsolete declarations X-BeenThere: make-initrd@lists.altlinux.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: make-initrd@lists.altlinux.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 May 2023 16:38:29 -0000 Archived-At: List-Archive: After the logging functions were moved to the common library, they were not removed from the header. Also includes have been grouped at the top of the header to increase readability. Fixes: 78769ff4 ("Move logging functions to the separate library") Signed-off-by: Alexey Gladkov --- datasrc/ueventd/path.c | 1 + datasrc/ueventd/queue-processor.c | 1 + datasrc/ueventd/ueventd.c | 1 + datasrc/ueventd/ueventd.h | 32 +++---------------------------- 4 files changed, 6 insertions(+), 29 deletions(-) diff --git a/datasrc/ueventd/path.c b/datasrc/ueventd/path.c index 835f4fbb..330e8c82 100644 --- a/datasrc/ueventd/path.c +++ b/datasrc/ueventd/path.c @@ -5,6 +5,7 @@ #include #include +#include "rd/logging.h" #include "ueventd.h" int is_dot_dir(struct dirent *ent) diff --git a/datasrc/ueventd/queue-processor.c b/datasrc/ueventd/queue-processor.c index b8383f51..908492a7 100644 --- a/datasrc/ueventd/queue-processor.c +++ b/datasrc/ueventd/queue-processor.c @@ -13,6 +13,7 @@ #include #include "rd/memory.h" +#include "rd/logging.h" #include "ueventd.h" static void event_handler(struct watch *queue, char *path) __attribute__((nonnull(1, 2))); diff --git a/datasrc/ueventd/ueventd.c b/datasrc/ueventd/ueventd.c index 2d510d62..857d3b4f 100644 --- a/datasrc/ueventd/ueventd.c +++ b/datasrc/ueventd/ueventd.c @@ -20,6 +20,7 @@ #include #include "rd/memory.h" +#include "rd/logging.h" #include "ueventd.h" #define default_logfile "/var/log/ueventd.log" diff --git a/datasrc/ueventd/ueventd.h b/datasrc/ueventd/ueventd.h index 375fa40f..653549f7 100644 --- a/datasrc/ueventd/ueventd.h +++ b/datasrc/ueventd/ueventd.h @@ -5,6 +5,8 @@ #include #include +#include +#include #define F_ROOT_DIR (1 << 0) #define F_QUEUE_DIR (1 << 1) @@ -31,8 +33,7 @@ extern uint64_t session; extern void process_events(struct watch *queue) __attribute__((nonnull(1), noreturn)); /* path.c */ -#include - +extern int is_dot_dir(struct dirent *ent) __attribute__((nonnull(1))); extern DIR *xopendir(const char *path) __attribute__((nonnull(1))); extern struct dirent *xreaddir(DIR *d, const char *path) __attribute__((nonnull(1, 2))); extern int empty_directory(const char *path) __attribute__((nonnull(1))); @@ -43,31 +44,4 @@ extern ssize_t write_loop(int fd, const char *buffer, size_t count) __attribute_ /* process.c */ extern pid_t waitpid_retry(pid_t pid, int *wstatus, int options); -#include - -extern int is_dot_dir(struct dirent *ent) __attribute__((nonnull(1))); - -/* logging.c */ -#include -#include -#include -#include - -extern void rd_logging_init(int log_fd, int level, const char *progname); -extern void rd_logging_close(void); -extern int rd_logging_level(const char *lvl) __attribute__((nonnull(1))); -extern void rd_vmessage(const char *fmt, va_list ap) __attribute__((format(printf, 1, 0))); -extern void rd_log_vmessage(int priority, const char *fmt, va_list ap) __attribute__((format(printf, 2, 0))); -extern void rd_log_message(int priority, const char *fmt, ...) __attribute__((format(printf, 2, 3))); - -#define rd_fatal(format, arg...) \ - do { \ - rd_log_message(LOG_CRIT, "%s:%d: " format, __FILE__, __LINE__, ##arg); \ - _exit(EXIT_FAILURE); \ - } while (0) - -#define rd_err(format, arg...) rd_log_message(LOG_ERR, format, ##arg) -#define rd_info(format, arg...) rd_log_message(LOG_INFO, format, ##arg) -#define rd_dbg(format, arg...) rd_log_message(LOG_DEBUG, format, ##arg) - #endif /* __UEVENTD_H__ */ -- 2.33.8