aboutsummaryrefslogtreecommitdiffstats
path: root/com32/gpllib
diff options
context:
space:
mode:
authorPierre-Alexandre Meyer <pierre@mouraf.org>2009-08-22 10:34:40 -0700
committerErwan Velu <erwan.velu@free.fr>2009-08-24 15:33:52 +0200
commit9ffe8b0b4e2ff9b98813521f79c840d983424f82 (patch)
tree9badd4478a322ed163d7cfb70ee91fc134d4c98b /com32/gpllib
parent67ce2dc42d50baf6bdd0c53dc2df442cdfcf179a (diff)
downloadsyslinux-9ffe8b0b4e2ff9b98813521f79c840d983424f82.tar.gz
syslinux-9ffe8b0b4e2ff9b98813521f79c840d983424f82.tar.xz
syslinux-9ffe8b0b4e2ff9b98813521f79c840d983424f82.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);
}