1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-25 01:34:28 +03:00

sd-radv: remove log_radv_warning_errno()

According to our CODING_STYLE our library code should generally not log
beyond LOG_DEBUG. Let's hence get rid of log_radv_warning_errno() and
just use log_radv_errno() instead.
This commit is contained in:
Lennart Poettering 2018-10-02 16:22:54 +02:00
parent afc1feaeba
commit fdc2afc102
2 changed files with 4 additions and 5 deletions

View File

@ -85,5 +85,4 @@ struct sd_radv_prefix {
#define log_radv_full(level, error, fmt, ...) log_internal(level, error, __FILE__, __LINE__, __func__, "RADV: " fmt, ##__VA_ARGS__)
#define log_radv_errno(error, fmt, ...) log_radv_full(LOG_DEBUG, error, fmt, ##__VA_ARGS__)
#define log_radv_warning_errno(error, fmt, ...) log_radv_full(LOG_WARNING, error, fmt, ##__VA_ARGS__)
#define log_radv(fmt, ...) log_radv_errno(0, fmt, ##__VA_ARGS__)

View File

@ -250,7 +250,7 @@ static int radv_recv(sd_event_source *s, int fd, uint32_t revents, void *userdat
break;
default:
log_radv_warning_errno(r, "Error receiving from ICMPv6 socket: %m");
log_radv_errno(r, "Error receiving from ICMPv6 socket: %m");
break;
}
@ -261,7 +261,7 @@ static int radv_recv(sd_event_source *s, int fd, uint32_t revents, void *userdat
r = radv_send(ra, &src, ra->lifetime);
if (r < 0)
log_radv_warning_errno(r, "Unable to send solicited Router Advertisement to %s: %m", addr);
log_radv_errno(r, "Unable to send solicited Router Advertisement to %s: %m", addr);
else
log_radv("Sent solicited Router Advertisement to %s", addr);
@ -294,7 +294,7 @@ static int radv_timeout(sd_event_source *s, uint64_t usec, void *userdata) {
r = radv_send(ra, NULL, ra->lifetime);
if (r < 0)
log_radv_warning_errno(r, "Unable to send Router Advertisement: %m");
log_radv_errno(r, "Unable to send Router Advertisement: %m");
/* RFC 4861, Section 6.2.4, sending initial Router Advertisements */
if (ra->ra_sent < SD_RADV_MAX_INITIAL_RTR_ADVERTISEMENTS) {
@ -348,7 +348,7 @@ _public_ int sd_radv_stop(sd_radv *ra) {
with zero lifetime */
r = radv_send(ra, NULL, 0);
if (r < 0)
log_radv_warning_errno(r, "Unable to send last Router Advertisement with router lifetime set to zero: %m");
log_radv_errno(r, "Unable to send last Router Advertisement with router lifetime set to zero: %m");
radv_reset(ra);
ra->fd = safe_close(ra->fd);