Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/external/bsd/drm2/dist Put file, line, func in DRM_ERROR...
details: https://anonhg.NetBSD.org/src/rev/fb25c3ef26a8
branches: trunk
changeset: 364648:fb25c3ef26a8
user: riastradh <riastradh%NetBSD.org@localhost>
date: Mon Aug 27 13:42:47 2018 +0000
description:
Put file, line, func in DRM_ERROR messages.
diffstat:
sys/external/bsd/drm2/dist/drm/drm_drv.c | 18 ++++++++++--------
sys/external/bsd/drm2/dist/include/drm/drmP.h | 10 +++++-----
2 files changed, 15 insertions(+), 13 deletions(-)
diffs (92 lines):
diff -r bdffd221f667 -r fb25c3ef26a8 sys/external/bsd/drm2/dist/drm/drm_drv.c
--- a/sys/external/bsd/drm2/dist/drm/drm_drv.c Mon Aug 27 13:42:35 2018 +0000
+++ b/sys/external/bsd/drm2/dist/drm/drm_drv.c Mon Aug 27 13:42:47 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: drm_drv.c,v 1.7 2018/08/27 13:42:24 riastradh Exp $ */
+/* $NetBSD: drm_drv.c,v 1.8 2018/08/27 13:42:47 riastradh Exp $ */
/*
* Created: Fri Jan 19 10:48:35 2001 by faith%acm.org@localhost
@@ -29,7 +29,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: drm_drv.c,v 1.7 2018/08/27 13:42:24 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: drm_drv.c,v 1.8 2018/08/27 13:42:47 riastradh Exp $");
#include <linux/err.h>
#include <linux/export.h>
@@ -70,18 +70,20 @@
static struct dentry *drm_debugfs_root;
#endif
-void drm_err(const char *format, ...)
+#ifdef __NetBSD__
+void
+drm_err(const char *file, int line, const char *func, const char *format, ...)
{
-#ifdef __NetBSD__
va_list args;
va_start(args, format);
- /* XXX Convert this to a symbol name... */
- printf(KERN_ERR "[" DRM_NAME ":%p] *ERROR* ",
- __builtin_return_address(0));
+ printf(KERN_ERR "[" DRM_NAME ":(%s:%d)%s] *ERROR* ", file, line, func);
vprintf(format, args);
va_end(args);
+}
#else
+void drm_err(const char *format, ...)
+{
struct va_format vaf;
va_list args;
@@ -94,8 +96,8 @@
__builtin_return_address(0), &vaf);
va_end(args);
+}
#endif
-}
EXPORT_SYMBOL(drm_err);
void drm_ut_debug_printk(const char *function_name, const char *format, ...)
diff -r bdffd221f667 -r fb25c3ef26a8 sys/external/bsd/drm2/dist/include/drm/drmP.h
--- a/sys/external/bsd/drm2/dist/include/drm/drmP.h Mon Aug 27 13:42:35 2018 +0000
+++ b/sys/external/bsd/drm2/dist/include/drm/drmP.h Mon Aug 27 13:42:47 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: drmP.h,v 1.24 2018/08/27 13:36:32 riastradh Exp $ */
+/* $NetBSD: drmP.h,v 1.25 2018/08/27 13:42:47 riastradh Exp $ */
/*
* Internal Header for the Direct Rendering Manager
@@ -149,8 +149,8 @@
extern __printf(2, 3)
void drm_ut_debug_printk(const char *function_name,
const char *format, ...);
-extern __printf(1, 2)
-void drm_err(const char *format, ...);
+extern __printf(4, 5)
+void drm_err(const char *file, int line, const char *func, const char *format, ...);
/***********************************************************************/
/** \name DRM template customization defaults */
@@ -201,7 +201,7 @@
* \param arg arguments
*/
#define DRM_ERROR(fmt, ...) \
- drm_err(fmt, ##__VA_ARGS__)
+ drm_err(__FILE__, __LINE__, __func__, fmt, ##__VA_ARGS__)
/**
* Rate limited error output. Like DRM_ERROR() but won't flood the log.
@@ -216,7 +216,7 @@
DEFAULT_RATELIMIT_BURST); \
\
if (__ratelimit(&_rs)) \
- drm_err(fmt, ##__VA_ARGS__); \
+ drm_err(__FILE__, __LINE__, __func__, fmt, ##__VA_ARGS__); \
})
/**
Home |
Main Index |
Thread Index |
Old Index