debug.c (e98bdb3059cbf2b1cd4261e126b08429f64466c3) | debug.c (e328379a18c5293c123bc56c32f19f9365384686) |
---|---|
1/* 2 * This file is part of UBIFS. 3 * 4 * Copyright (C) 2006-2008 Nokia Corporation 5 * 6 * This program is free software; you can redistribute it and/or modify it 7 * under the terms of the GNU General Public License version 2 as published by 8 * the Free Software Foundation. --- 18 unchanged lines hidden (view full) --- 27 * various local functions of those subsystems. 28 */ 29 30#include <linux/module.h> 31#include <linux/debugfs.h> 32#include <linux/math64.h> 33#include <linux/uaccess.h> 34#include <linux/random.h> | 1/* 2 * This file is part of UBIFS. 3 * 4 * Copyright (C) 2006-2008 Nokia Corporation 5 * 6 * This program is free software; you can redistribute it and/or modify it 7 * under the terms of the GNU General Public License version 2 as published by 8 * the Free Software Foundation. --- 18 unchanged lines hidden (view full) --- 27 * various local functions of those subsystems. 28 */ 29 30#include <linux/module.h> 31#include <linux/debugfs.h> 32#include <linux/math64.h> 33#include <linux/uaccess.h> 34#include <linux/random.h> |
35#include <linux/ctype.h> |
|
35#include "ubifs.h" 36 37static DEFINE_SPINLOCK(dbg_lock); 38 39static const char *get_key_fmt(int fmt) 40{ 41 switch (fmt) { 42 case UBIFS_SIMPLE_KEY_FMT: --- 416 unchanged lines hidden (view full) --- 459 pr_err("\ttype %d\n", (int)dent->type); 460 pr_err("\tnlen %d\n", nlen); 461 pr_err("\tname "); 462 463 if (nlen > UBIFS_MAX_NLEN) 464 pr_err("(bad name length, not printing, bad or corrupted node)"); 465 else { 466 for (i = 0; i < nlen && dent->name[i]; i++) | 36#include "ubifs.h" 37 38static DEFINE_SPINLOCK(dbg_lock); 39 40static const char *get_key_fmt(int fmt) 41{ 42 switch (fmt) { 43 case UBIFS_SIMPLE_KEY_FMT: --- 416 unchanged lines hidden (view full) --- 460 pr_err("\ttype %d\n", (int)dent->type); 461 pr_err("\tnlen %d\n", nlen); 462 pr_err("\tname "); 463 464 if (nlen > UBIFS_MAX_NLEN) 465 pr_err("(bad name length, not printing, bad or corrupted node)"); 466 else { 467 for (i = 0; i < nlen && dent->name[i]; i++) |
467 pr_cont("%c", dent->name[i]); | 468 pr_cont("%c", isprint(dent->name[i]) ? 469 dent->name[i] : '?'); |
468 } 469 pr_cont("\n"); 470 471 break; 472 } 473 case UBIFS_DATA_NODE: 474 { 475 const struct ubifs_data_node *dn = node; --- 2629 unchanged lines hidden --- | 470 } 471 pr_cont("\n"); 472 473 break; 474 } 475 case UBIFS_DATA_NODE: 476 { 477 const struct ubifs_data_node *dn = node; --- 2629 unchanged lines hidden --- |