]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
tools lib api: Renaming pr_warning to pr_warn
authorKefeng Wang <wangkefeng.wang@huawei.com>
Fri, 18 Oct 2019 03:18:47 +0000 (11:18 +0800)
committerPetr Mladek <pmladek@suse.com>
Fri, 18 Oct 2019 13:02:57 +0000 (15:02 +0200)
For kernel logging macro, pr_warning is completely removed and
replaced by pr_warn, using pr_warn in tools lib api for symmetry
to kernel logging macro, then we could drop pr_warning in the
whole linux code.

Changing __pr_warning to __pr_warn to be consistent.

Link: http://lkml.kernel.org/r/20191018031850.48498-30-wangkefeng.wang@huawei.com
To: linux-kernel@vger.kernel.org
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
Reviewed-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Signed-off-by: Petr Mladek <pmladek@suse.com>
tools/lib/api/debug-internal.h
tools/lib/api/debug.c
tools/lib/api/fs/fs.c

index 80c783497d25bcc3d6e43d4d11990844653e857d..5a5820c11db81db3c56ac0d4a45a3a21aff58ffb 100644 (file)
@@ -10,11 +10,11 @@ do {                                \
                (func)("libapi: " fmt, ##__VA_ARGS__); \
 } while (0)
 
-extern libapi_print_fn_t __pr_warning;
+extern libapi_print_fn_t __pr_warn;
 extern libapi_print_fn_t __pr_info;
 extern libapi_print_fn_t __pr_debug;
 
-#define pr_warning(fmt, ...)   __pr(__pr_warning, fmt, ##__VA_ARGS__)
+#define pr_warn(fmt, ...)      __pr(__pr_warn, fmt, ##__VA_ARGS__)
 #define pr_info(fmt, ...)      __pr(__pr_info, fmt, ##__VA_ARGS__)
 #define pr_debug(fmt, ...)     __pr(__pr_debug, fmt, ##__VA_ARGS__)
 
index 69b1ba3d1ee380724bfa02a94f80959a7cad2828..7708f0558e8c302e899685cf4ec4d3c972129fad 100644 (file)
@@ -15,7 +15,7 @@ static int __base_pr(const char *format, ...)
        return err;
 }
 
-libapi_print_fn_t __pr_warning = __base_pr;
+libapi_print_fn_t __pr_warn    = __base_pr;
 libapi_print_fn_t __pr_info    = __base_pr;
 libapi_print_fn_t __pr_debug;
 
@@ -23,7 +23,7 @@ void libapi_set_print(libapi_print_fn_t warn,
                      libapi_print_fn_t info,
                      libapi_print_fn_t debug)
 {
-       __pr_warning = warn;
+       __pr_warn    = warn;
        __pr_info    = info;
        __pr_debug   = debug;
 }
index 7aba8243a0e7cbd3fa4726910db27bcaa3be6d1a..11b3885e833ed8eb4cfd7f32ba981abcdf58e5cf 100644 (file)
@@ -381,8 +381,8 @@ int filename__read_str(const char *filename, char **buf, size_t *sizep)
                n = read(fd, bf + size, alloc_size - size);
                if (n < 0) {
                        if (size) {
-                               pr_warning("read failed %d: %s\n", errno,
-                                        strerror_r(errno, sbuf, sizeof(sbuf)));
+                               pr_warn("read failed %d: %s\n", errno,
+                                       strerror_r(errno, sbuf, sizeof(sbuf)));
                                err = 0;
                        } else
                                err = -errno;