direct-io.hg

changeset 13671:effa38a30a5c

Remove unused implementation of vsprintf().
Signed-off-by: Keir Fraser <keir@xensource.com>
author kfraser@localhost.localdomain
date Mon Jan 29 21:16:02 2007 +0000 (2007-01-29)
parents e7ceed4ebcd9
children 5e3b47bcc311
files xen/common/vsprintf.c xen/include/xen/lib.h
line diff
     1.1 --- a/xen/common/vsprintf.c	Mon Jan 29 17:01:53 2007 +0000
     1.2 +++ b/xen/common/vsprintf.c	Mon Jan 29 21:16:02 2007 +0000
     1.3 @@ -182,15 +182,6 @@ static char *number(
     1.4          tmp[i++]='0';
     1.5      else while (num != 0)
     1.6          tmp[i++] = digits[do_div(num,base)];
     1.7 -#if 0
     1.8 -    else 
     1.9 -    {
    1.10 -        /* XXX KAF: force unsigned mod and div. */
    1.11 -        unsigned long long num2=(unsigned long long)num;
    1.12 -        unsigned int base2=(unsigned int)base;
    1.13 -        while (num2 != 0) { tmp[i++] = digits[num2%base2]; num2 /= base2; }
    1.14 -    }
    1.15 -#endif
    1.16      if (i > precision)
    1.17          precision = i;
    1.18      size -= precision;
    1.19 @@ -571,26 +562,6 @@ int scnprintf(char * buf, size_t size, c
    1.20  EXPORT_SYMBOL(scnprintf);
    1.21  
    1.22  /**
    1.23 - * vsprintf - Format a string and place it in a buffer
    1.24 - * @buf: The buffer to place the result into
    1.25 - * @fmt: The format string to use
    1.26 - * @args: Arguments for the format string
    1.27 - *
    1.28 - * The function returns the number of characters written
    1.29 - * into @buf. Use vsnprintf or vscnprintf in order to avoid
    1.30 - * buffer overflows.
    1.31 - *
    1.32 - * Call this function if you are already dealing with a va_list.
    1.33 - * You probably want sprintf instead.
    1.34 - */
    1.35 -int vsprintf(char *buf, const char *fmt, va_list args)
    1.36 -{
    1.37 -    return vsnprintf(buf, INT_MAX, fmt, args);
    1.38 -}
    1.39 -
    1.40 -EXPORT_SYMBOL(vsprintf);
    1.41 -
    1.42 -/**
    1.43   * sprintf - Format a string and place it in a buffer
    1.44   * @buf: The buffer to place the result into
    1.45   * @fmt: The format string to use
     2.1 --- a/xen/include/xen/lib.h	Mon Jan 29 17:01:53 2007 +0000
     2.2 +++ b/xen/include/xen/lib.h	Mon Jan 29 21:16:02 2007 +0000
     2.3 @@ -62,8 +62,7 @@ extern int printk_ratelimit(void);
     2.4  /* vsprintf.c */
     2.5  extern int sprintf(char * buf, const char * fmt, ...)
     2.6      __attribute__ ((format (printf, 2, 3)));
     2.7 -extern int vsprintf(char *buf, const char *, va_list)
     2.8 -    __attribute__ ((format (printf, 2, 0)));
     2.9 +#define vsprintf __xen_has_no_vsprintf__
    2.10  extern int snprintf(char * buf, size_t size, const char * fmt, ...)
    2.11      __attribute__ ((format (printf, 3, 4)));
    2.12  extern int vsnprintf(char *buf, size_t size, const char *fmt, va_list args)