aboutsummaryrefslogtreecommitdiffstats
path: root/com32/gpllib
diff options
context:
space:
mode:
authorPierre-Alexandre Meyer <pierre@mouraf.org>2009-08-22 10:34:40 -0700
committerPierre-Alexandre Meyer <pierre@mouraf.org>2009-08-22 10:34:40 -0700
commit6bc9a8305bca8c933da90481f536407b733b806f (patch)
tree9badd4478a322ed163d7cfb70ee91fc134d4c98b /com32/gpllib
parentb3514f90bf55e5a1f277cbcf83afa509b9d13acc (diff)
downloadsyslinux-6bc9a8305bca8c933da90481f536407b733b806f.tar.gz
syslinux-6bc9a8305bca8c933da90481f536407b733b806f.tar.xz
syslinux-6bc9a8305bca8c933da90481f536407b733b806f.zip
hdt: make get_error behaves like perror
This simplifies buffer handling. Misc.: clean some old error code handling. Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Diffstat (limited to 'com32/gpllib')
-rw-r--r--com32/gpllib/disk/error.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/com32/gpllib/disk/error.c b/com32/gpllib/disk/error.c
index 2b82c359..1853092b 100644
--- a/com32/gpllib/disk/error.c
+++ b/com32/gpllib/disk/error.c
@@ -8,8 +8,7 @@
* ----------------------------------------------------------------------- */
#include <stdio.h>
-#include <stdlib.h>
-
+#include <string.h>
#include <disk/errno_disk.h>
/**
@@ -18,7 +17,7 @@
*
* Fill @buffer_ptr with the last errno_disk
**/
-void get_error(void* buffer_ptr)
+void get_error(const char* s)
{
- snprintf(buffer_ptr, MAX_DISK_ERRNO, "Disklib: error %d\n", errno_disk);
+ fprintf(stderr, "%s: error %d\n", s, errno_disk);
}