提交 a0e856b0 编写于 作者: A Alex Elder

xfs: add const qualifiers to xfs error function args

Change the tag and file name arguments to xfs_error_report() and
xfs_corruption_error() to use a const qualifier.
Signed-off-by: NAlex Elder <aelder@sgi.com>
Reviewed-by: NChristoph Hellwig <hch@lst.de>
Signed-off-by: NDave Chinner <dchinner@redhat.com>
上级 74457cf4
...@@ -186,18 +186,18 @@ xfs_cmn_err(int panic_tag, int level, xfs_mount_t *mp, char *fmt, ...) ...@@ -186,18 +186,18 @@ xfs_cmn_err(int panic_tag, int level, xfs_mount_t *mp, char *fmt, ...)
void void
xfs_error_report( xfs_error_report(
char *tag, const char *tag,
int level, int level,
xfs_mount_t *mp, struct xfs_mount *mp,
char *fname, const char *filename,
int linenum, int linenum,
inst_t *ra) inst_t *ra)
{ {
if (level <= xfs_error_level) { if (level <= xfs_error_level) {
xfs_cmn_err(XFS_PTAG_ERROR_REPORT, xfs_cmn_err(XFS_PTAG_ERROR_REPORT,
CE_ALERT, mp, CE_ALERT, mp,
"XFS internal error %s at line %d of file %s. Caller 0x%p\n", "XFS internal error %s at line %d of file %s. Caller 0x%p\n",
tag, linenum, fname, ra); tag, linenum, filename, ra);
xfs_stack_trace(); xfs_stack_trace();
} }
...@@ -205,15 +205,15 @@ xfs_error_report( ...@@ -205,15 +205,15 @@ xfs_error_report(
void void
xfs_corruption_error( xfs_corruption_error(
char *tag, const char *tag,
int level, int level,
xfs_mount_t *mp, struct xfs_mount *mp,
void *p, void *p,
char *fname, const char *filename,
int linenum, int linenum,
inst_t *ra) inst_t *ra)
{ {
if (level <= xfs_error_level) if (level <= xfs_error_level)
xfs_hex_dump(p, 16); xfs_hex_dump(p, 16);
xfs_error_report(tag, level, mp, fname, linenum, ra); xfs_error_report(tag, level, mp, filename, linenum, ra);
} }
...@@ -29,10 +29,11 @@ extern int xfs_error_trap(int); ...@@ -29,10 +29,11 @@ extern int xfs_error_trap(int);
struct xfs_mount; struct xfs_mount;
extern void xfs_error_report(char *tag, int level, struct xfs_mount *mp, extern void xfs_error_report(const char *tag, int level, struct xfs_mount *mp,
char *fname, int linenum, inst_t *ra); const char *filename, int linenum, inst_t *ra);
extern void xfs_corruption_error(char *tag, int level, struct xfs_mount *mp, extern void xfs_corruption_error(const char *tag, int level,
void *p, char *fname, int linenum, inst_t *ra); struct xfs_mount *mp, void *p, const char *filename,
int linenum, inst_t *ra);
#define XFS_ERROR_REPORT(e, lvl, mp) \ #define XFS_ERROR_REPORT(e, lvl, mp) \
xfs_error_report(e, lvl, mp, __FILE__, __LINE__, __return_address) xfs_error_report(e, lvl, mp, __FILE__, __LINE__, __return_address)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册