Commit a0e856b0b4d182c4c52b568bd04bd96a172247a7

Authored by Alex Elder
1 parent 74457cf4a3

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: Alex Elder <aelder@sgi.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Dave Chinner <dchinner@redhat.com>

Showing 2 changed files with 20 additions and 19 deletions Side-by-side Diff

... ... @@ -186,18 +186,18 @@
186 186  
187 187 void
188 188 xfs_error_report(
189   - char *tag,
190   - int level,
191   - xfs_mount_t *mp,
192   - char *fname,
193   - int linenum,
194   - inst_t *ra)
  189 + const char *tag,
  190 + int level,
  191 + struct xfs_mount *mp,
  192 + const char *filename,
  193 + int linenum,
  194 + inst_t *ra)
195 195 {
196 196 if (level <= xfs_error_level) {
197 197 xfs_cmn_err(XFS_PTAG_ERROR_REPORT,
198 198 CE_ALERT, mp,
199 199 "XFS internal error %s at line %d of file %s. Caller 0x%p\n",
200   - tag, linenum, fname, ra);
  200 + tag, linenum, filename, ra);
201 201  
202 202 xfs_stack_trace();
203 203 }
204 204  
... ... @@ -205,16 +205,16 @@
205 205  
206 206 void
207 207 xfs_corruption_error(
208   - char *tag,
209   - int level,
210   - xfs_mount_t *mp,
211   - void *p,
212   - char *fname,
213   - int linenum,
214   - inst_t *ra)
  208 + const char *tag,
  209 + int level,
  210 + struct xfs_mount *mp,
  211 + void *p,
  212 + const char *filename,
  213 + int linenum,
  214 + inst_t *ra)
215 215 {
216 216 if (level <= xfs_error_level)
217 217 xfs_hex_dump(p, 16);
218   - xfs_error_report(tag, level, mp, fname, linenum, ra);
  218 + xfs_error_report(tag, level, mp, filename, linenum, ra);
219 219 }
... ... @@ -29,10 +29,11 @@
29 29  
30 30 struct xfs_mount;
31 31  
32   -extern void xfs_error_report(char *tag, int level, struct xfs_mount *mp,
33   - char *fname, int linenum, inst_t *ra);
34   -extern void xfs_corruption_error(char *tag, int level, struct xfs_mount *mp,
35   - void *p, char *fname, int linenum, inst_t *ra);
  32 +extern void xfs_error_report(const char *tag, int level, struct xfs_mount *mp,
  33 + const char *filename, int linenum, inst_t *ra);
  34 +extern void xfs_corruption_error(const char *tag, int level,
  35 + struct xfs_mount *mp, void *p, const char *filename,
  36 + int linenum, inst_t *ra);
36 37  
37 38 #define XFS_ERROR_REPORT(e, lvl, mp) \
38 39 xfs_error_report(e, lvl, mp, __FILE__, __LINE__, __return_address)