xfs_error.c (0a3abcf75bf391fec4e32356ab5ddb8f5d2e6b41) xfs_error.c (f0e2d93c29dc39ffd24cac180a19d48f700c0706)
1/*
2 * Copyright (c) 2000-2001,2005 Silicon Graphics, Inc.
3 * All Rights Reserved.
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License as
7 * published by the Free Software Foundation.
8 *

--- 136 unchanged lines hidden (view full) ---

145 for (i = 0; i < XFS_NUM_INJECT_ERROR; i++) {
146 if ((fsid == 0LL || xfs_etest_fsid[i] == fsid) &&
147 xfs_etest[i] != 0) {
148 cleared = 1;
149 cmn_err(CE_WARN, "Clearing XFS error tag #%d",
150 xfs_etest[i]);
151 xfs_etest[i] = 0;
152 xfs_etest_fsid[i] = 0LL;
1/*
2 * Copyright (c) 2000-2001,2005 Silicon Graphics, Inc.
3 * All Rights Reserved.
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License as
7 * published by the Free Software Foundation.
8 *

--- 136 unchanged lines hidden (view full) ---

145 for (i = 0; i < XFS_NUM_INJECT_ERROR; i++) {
146 if ((fsid == 0LL || xfs_etest_fsid[i] == fsid) &&
147 xfs_etest[i] != 0) {
148 cleared = 1;
149 cmn_err(CE_WARN, "Clearing XFS error tag #%d",
150 xfs_etest[i]);
151 xfs_etest[i] = 0;
152 xfs_etest_fsid[i] = 0LL;
153 kmem_free(xfs_etest_fsname[i],
154 strlen(xfs_etest_fsname[i]) + 1);
153 kmem_free(xfs_etest_fsname[i]);
155 xfs_etest_fsname[i] = NULL;
156 }
157 }
158
159 if (loud || cleared)
160 cmn_err(CE_WARN,
161 "Cleared all XFS error tags for filesystem \"%s\"",
162 mp->m_fsname);

--- 7 unchanged lines hidden (view full) ---

170{
171 if (mp != NULL) {
172 char *newfmt;
173 int len = 16 + mp->m_fsname_len + strlen(fmt);
174
175 newfmt = kmem_alloc(len, KM_SLEEP);
176 sprintf(newfmt, "Filesystem \"%s\": %s", mp->m_fsname, fmt);
177 icmn_err(level, newfmt, ap);
154 xfs_etest_fsname[i] = NULL;
155 }
156 }
157
158 if (loud || cleared)
159 cmn_err(CE_WARN,
160 "Cleared all XFS error tags for filesystem \"%s\"",
161 mp->m_fsname);

--- 7 unchanged lines hidden (view full) ---

169{
170 if (mp != NULL) {
171 char *newfmt;
172 int len = 16 + mp->m_fsname_len + strlen(fmt);
173
174 newfmt = kmem_alloc(len, KM_SLEEP);
175 sprintf(newfmt, "Filesystem \"%s\": %s", mp->m_fsname, fmt);
176 icmn_err(level, newfmt, ap);
178 kmem_free(newfmt, len);
177 kmem_free(newfmt);
179 } else {
180 icmn_err(level, fmt, ap);
181 }
182}
183
184void
185xfs_fs_cmn_err(int level, xfs_mount_t *mp, char *fmt, ...)
186{

--- 60 unchanged lines hidden ---
178 } else {
179 icmn_err(level, fmt, ap);
180 }
181}
182
183void
184xfs_fs_cmn_err(int level, xfs_mount_t *mp, char *fmt, ...)
185{

--- 60 unchanged lines hidden ---