Exemple #1
0
void
xfs_alert_tag(
	const struct xfs_mount	*mp,
	int			panic_tag,
	const char		*fmt, ...)
{
	struct va_format	vaf;
	va_list			args;
	int			do_panic = 0;

	if (xfs_panic_mask && (xfs_panic_mask & panic_tag)) {
		xfs_alert(mp, "Transforming an alert into a BUG.");
		do_panic = 1;
	}

	va_start(args, fmt);

	vaf.fmt = fmt;
	vaf.va = &args;

	__xfs_printk(KERN_ALERT, mp, &vaf);
	va_end(args);

	BUG_ON(do_panic);
}
Exemple #2
0
int xfs_printk(
	const char		*level,
	const struct xfs_mount	*mp,
	const char		*fmt, ...)
{
	struct va_format	vaf;
	va_list			args;
	int			 r;

	va_start(args, fmt);

	vaf.fmt = fmt;
	vaf.va = &args;

	r = __xfs_printk(level, mp, &vaf);
	va_end(args);

	return r;
}