='cgit v1.2.2'/>
aboutsummaryrefslogblamecommitdiffstats
path: root/fs/befs/debug.c
blob: 622e73775c83e91da573ff7266688d19e25f3dca (plain) (tree)


















                                                            
                       



                                                






                                                              
                                                        
















                                                                             
                                                        






















                                                                             
                                                          




















































                                                                              
                                                    








































































































                                                                               
                                                                    


                        
                                                 
 
                                                                             





                                                   
                                                                                  


































                                                                              
/*
 *  linux/fs/befs/debug.c
 * 
 * Copyright (C) 2001 Will Dyson (will_dyson at pobox.com)
 *
 * With help from the ntfs-tng driver by Anton Altparmakov
 *
 * Copyright (C) 1999  Makoto Kato (m_kato@ga2.so-net.ne.jp)
 *
 * debug functions
 */

#ifdef __KERNEL__

#include <stdarg.h>
#include <linux/string.h>
#include <linux/spinlock.h>
#include <linux/kernel.h>
#include <linux/fs.h>
#include <linux/slab.h>

#endif				/* __KERNEL__ */

#include "befs.h"

#define ERRBUFSIZE 1024

void
befs_error(const struct super_block *sb, const char *fmt, ...)
{
	va_list args;
	char *err_buf = kmalloc(ERRBUFSIZE, GFP_KERNEL);
	if (err_buf == NULL) {
		printk(KERN_ERR "could not allocate %d bytes\n", ERRBUFSIZE);
		return;
	}

	va_start(args, fmt);
	vsnprintf(err_buf, ERRBUFSIZE, fmt, args);
	va_end(args);

	printk(KERN_ERR "BeFS(%s): %s\n", sb->s_id, err_buf);
	kfree(err_buf);
}

void
befs_warning(const struct super_block *sb, const char *fmt, ...)
{
	va_list args;
	char *err_buf = kmalloc(ERRBUFSIZE, GFP_KERNEL);
	if (err_buf == NULL) {
		printk(KERN_ERR "could not allocate %d bytes\n", ERRBUFSIZE);
		return;
	}

	va_start(args, fmt);