mirror of
https://github.com/AuxXxilium/eudev.git
synced 2024-12-21 06:03:39 +07:00
log: rearrange log function naming
- Rename log_meta() → log_internal(), to follow naming scheme of most other log functions that are usually invoked through macros, but never directly. - Rename log_info_object() to log_object_info(), simply because the object should be before any other parameters, to follow OO-style programming style. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
This commit is contained in:
parent
107530eaa3
commit
e72e57a66f
@ -465,7 +465,7 @@ static int log_dispatch(
|
||||
return r;
|
||||
}
|
||||
|
||||
int log_metav(
|
||||
int log_internalv(
|
||||
int level,
|
||||
int error,
|
||||
const char*file,
|
||||
@ -486,7 +486,7 @@ int log_metav(
|
||||
return log_dispatch(level, error, file, line, func, NULL, NULL, buffer);
|
||||
}
|
||||
|
||||
int log_meta(
|
||||
int log_internal(
|
||||
int level,
|
||||
int error,
|
||||
const char*file,
|
||||
@ -498,7 +498,7 @@ int log_meta(
|
||||
va_list ap;
|
||||
|
||||
va_start(ap, format);
|
||||
r = log_metav(level, error, file, line, func, format, ap);
|
||||
r = log_internalv(level, error, file, line, func, format, ap);
|
||||
va_end(ap);
|
||||
|
||||
return r;
|
||||
@ -537,7 +537,7 @@ noreturn void log_assert_failed_unreachable(const char *text, const char *file,
|
||||
}
|
||||
|
||||
int log_oom_internal(const char *file, int line, const char *func) {
|
||||
log_meta(LOG_ERR, ENOMEM, file, line, func, "Out of memory.");
|
||||
log_internal(LOG_ERR, ENOMEM, file, line, func, "Out of memory.");
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
|
@ -52,18 +52,18 @@ void log_close_journal(void);
|
||||
void log_close_kmsg(void);
|
||||
void log_close_console(void);
|
||||
|
||||
int log_meta(
|
||||
int log_internal(
|
||||
int level,
|
||||
int error,
|
||||
const char*file,
|
||||
const char *file,
|
||||
int line,
|
||||
const char *func,
|
||||
const char *format, ...) _printf_(6,7);
|
||||
|
||||
int log_metav(
|
||||
int log_internalv(
|
||||
int level,
|
||||
int error,
|
||||
const char*file,
|
||||
const char *file,
|
||||
int line,
|
||||
const char *func,
|
||||
const char *format,
|
||||
@ -92,7 +92,7 @@ noreturn void log_assert_failed_unreachable(
|
||||
#define log_full_errno(level, error, ...) \
|
||||
do { \
|
||||
if (log_get_max_level() >= (level)) \
|
||||
log_meta((level), error, __FILE__, __LINE__, __func__, __VA_ARGS__); \
|
||||
log_internal((level), error, __FILE__, __LINE__, __func__, __VA_ARGS__); \
|
||||
} while (false)
|
||||
|
||||
#define log_full(level, ...) log_full_errno(level, 0, __VA_ARGS__)
|
||||
|
@ -86,7 +86,7 @@ static int load_module(struct udev *udev, const char *alias) {
|
||||
}
|
||||
|
||||
_printf_(6,0) static void udev_kmod_log(void *data, int priority, const char *file, int line, const char *fn, const char *format, va_list args) {
|
||||
log_metav(priority, 0, file, line, fn, format, args);
|
||||
log_internalv(priority, 0, file, line, fn, format, args);
|
||||
}
|
||||
|
||||
static int builtin_kmod(struct udev_device *dev, int argc, char *argv[], bool test) {
|
||||
|
Loading…
Reference in New Issue
Block a user