blob: 79fae3b33bdd3a67b664266360b94d62b6913d5f [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
Nathan Scott7b718762005-11-02 14:58:39 +11002 * Copyright (c) 2000-2003,2005 Silicon Graphics, Inc.
3 * All Rights Reserved.
Linus Torvalds1da177e2005-04-16 15:20:36 -07004 *
Nathan Scott7b718762005-11-02 14:58:39 +11005 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License as
Linus Torvalds1da177e2005-04-16 15:20:36 -07007 * published by the Free Software Foundation.
8 *
Nathan Scott7b718762005-11-02 14:58:39 +11009 * This program is distributed in the hope that it would be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
Linus Torvalds1da177e2005-04-16 15:20:36 -070013 *
Nathan Scott7b718762005-11-02 14:58:39 +110014 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write the Free Software Foundation,
16 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Linus Torvalds1da177e2005-04-16 15:20:36 -070017 */
Vlad Apostolov93c189c2006-11-11 18:03:49 +110018#include <xfs.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070019#include "debug.h"
Linus Torvalds1da177e2005-04-16 15:20:36 -070020
Linus Torvalds1da177e2005-04-16 15:20:36 -070021void
Nathan Scott3762ec62006-01-12 10:29:53 +110022assfail(char *expr, char *file, int line)
23{
Anton Blanchard65a84a02011-01-07 03:30:41 +000024 printk(KERN_CRIT "Assertion failed: %s, file: %s, line: %d\n", expr,
25 file, line);
Nathan Scott3762ec62006-01-12 10:29:53 +110026 BUG();
27}
Eric Sandeend4f3cc02007-10-12 11:13:08 +100028
29void
30xfs_hex_dump(void *p, int length)
31{
Barry Naujok34519da2008-10-30 17:05:58 +110032 print_hex_dump(KERN_ALERT, "", DUMP_PREFIX_ADDRESS, 16, 1, p, length, 1);
Eric Sandeend4f3cc02007-10-12 11:13:08 +100033}