vsprintf.c (616ad8c44281c0c6711a72b560e01ec335ff27e0) vsprintf.c (deac93df26b20cf8438339b5935b5f5643bc30c9)
1/*
2 * linux/lib/vsprintf.c
3 *
4 * Copyright (C) 1991, 1992 Linus Torvalds
5 */
6
7/* vsprintf.c -- Lars Wirzenius & Linus Torvalds. */
8/*

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

22#include <linux/string.h>
23#include <linux/ctype.h>
24#include <linux/kernel.h>
25#include <linux/kallsyms.h>
26#include <linux/uaccess.h>
27
28#include <asm/page.h> /* for PAGE_SIZE */
29#include <asm/div64.h>
1/*
2 * linux/lib/vsprintf.c
3 *
4 * Copyright (C) 1991, 1992 Linus Torvalds
5 */
6
7/* vsprintf.c -- Lars Wirzenius & Linus Torvalds. */
8/*

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

22#include <linux/string.h>
23#include <linux/ctype.h>
24#include <linux/kernel.h>
25#include <linux/kallsyms.h>
26#include <linux/uaccess.h>
27
28#include <asm/page.h> /* for PAGE_SIZE */
29#include <asm/div64.h>
30#include <asm/sections.h> /* for dereference_function_descriptor() */
30
31/* Works only for digits and letters, but small and fast */
32#define TOLOWER(x) ((x) | 0x20)
33
34/**
35 * simple_strtoul - convert a string to an unsigned long
36 * @cp: The start of the string
37 * @endp: A pointer to the end of the parsed string will be placed here

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

508 while (len < field_width--) {
509 if (buf < end)
510 *buf = ' ';
511 ++buf;
512 }
513 return buf;
514}
515
31
32/* Works only for digits and letters, but small and fast */
33#define TOLOWER(x) ((x) | 0x20)
34
35/**
36 * simple_strtoul - convert a string to an unsigned long
37 * @cp: The start of the string
38 * @endp: A pointer to the end of the parsed string will be placed here

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

509 while (len < field_width--) {
510 if (buf < end)
511 *buf = ' ';
512 ++buf;
513 }
514 return buf;
515}
516
516static inline void *dereference_function_descriptor(void *ptr)
517{
518#if defined(CONFIG_IA64) || defined(CONFIG_PPC64)
519 void *p;
520 if (!probe_kernel_address(ptr, p))
521 ptr = p;
522#endif
523 return ptr;
524}
525
526static char *symbol_string(char *buf, char *end, void *ptr, int field_width, int precision, int flags)
527{
528 unsigned long value = (unsigned long) ptr;
529#ifdef CONFIG_KALLSYMS
530 char sym[KSYM_SYMBOL_LEN];
531 sprint_symbol(sym, value);
532 return string(buf, end, sym, field_width, precision, flags);
533#else

--- 633 unchanged lines hidden ---
517static char *symbol_string(char *buf, char *end, void *ptr, int field_width, int precision, int flags)
518{
519 unsigned long value = (unsigned long) ptr;
520#ifdef CONFIG_KALLSYMS
521 char sym[KSYM_SYMBOL_LEN];
522 sprint_symbol(sym, value);
523 return string(buf, end, sym, field_width, precision, flags);
524#else

--- 633 unchanged lines hidden ---