aboutsummaryrefslogtreecommitdiff
path: root/libc
diff options
context:
space:
mode:
authorStewart Smith <stewart@linux.vnet.ibm.com>2014-11-28 17:23:32 +1100
committerStewart Smith <stewart@linux.vnet.ibm.com>2014-11-28 17:23:32 +1100
commit124591c0f398341c0262ee2804c08c6f0e2dbdf6 (patch)
treee7cc9a17a0c3a6e1818264d54bbc79b61a095ec4 /libc
parent209611863a21e335daff50a94257d0f7fd145cdc (diff)
downloadskiboot-124591c0f398341c0262ee2804c08c6f0e2dbdf6.zip
skiboot-124591c0f398341c0262ee2804c08c6f0e2dbdf6.tar.gz
skiboot-124591c0f398341c0262ee2804c08c6f0e2dbdf6.tar.bz2
Remove sprintf: there's no good reason to have this in firmware
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'libc')
-rw-r--r--libc/include/stdio.h1
-rw-r--r--libc/stdio/Makefile.inc2
-rw-r--r--libc/stdio/sprintf.c30
3 files changed, 1 insertions, 32 deletions
diff --git a/libc/include/stdio.h b/libc/include/stdio.h
index 57d655a..6dd82c3 100644
--- a/libc/include/stdio.h
+++ b/libc/include/stdio.h
@@ -42,7 +42,6 @@ extern FILE stderr_data;
int fileno(FILE *stream);
int printf(const char *format, ...) __attribute__((format (printf, 1, 2)));
int fprintf(FILE *stream, const char *format, ...) __attribute__((format (printf, 2, 3)));
-int sprintf(char *str, const char *format, ...) __attribute__((format (printf, 2, 3)));
int snprintf(char *str, size_t size, const char *format, ...) __attribute__((format (printf, 3, 4)));
int vfprintf(FILE *stream, const char *format, va_list);
int vsprintf(char *str, const char *format, va_list);
diff --git a/libc/stdio/Makefile.inc b/libc/stdio/Makefile.inc
index f375f93..025ee01 100644
--- a/libc/stdio/Makefile.inc
+++ b/libc/stdio/Makefile.inc
@@ -13,7 +13,7 @@
SUBDIRS += $(LIBCDIR)/stdio
-STDIO_OBJS = fscanf.o sprintf.o vfprintf.o vsnprintf.o vsprintf.o fprintf.o \
+STDIO_OBJS = fscanf.o vfprintf.o vsnprintf.o vsprintf.o fprintf.o \
setvbuf.o fputc.o puts.o fputs.o putchar.o scanf.o \
stdchnls.o vfscanf.o vsscanf.o fileno.o snprintf.o
diff --git a/libc/stdio/sprintf.c b/libc/stdio/sprintf.c
deleted file mode 100644
index 9c4540e..0000000
--- a/libc/stdio/sprintf.c
+++ /dev/null
@@ -1,30 +0,0 @@
-/******************************************************************************
- * Copyright (c) 2004, 2008 IBM Corporation
- * All rights reserved.
- * This program and the accompanying materials
- * are made available under the terms of the BSD License
- * which accompanies this distribution, and is available at
- * http://www.opensource.org/licenses/bsd-license.php
- *
- * Contributors:
- * IBM Corporation - initial implementation
- *****************************************************************************/
-
-#include <stdio.h>
-
-
-int sprintf(char *buff, const char *format, ...)
-{
- va_list ar;
- int count;
-
- if ((buff==NULL) || (format==NULL))
- return(-1);
-
- va_start(ar, format);
- count = vsprintf(buff, format, ar);
- va_end(ar);
-
- return(count);
-}
-