aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPierre-Alexandre Meyer <pierre@mouraf.org>2009-04-21 12:01:15 -0700
committerPierre-Alexandre Meyer <pierre@mouraf.org>2009-04-21 12:01:15 -0700
commit87ecdfc5006737a107465f6ef27787184044e73d (patch)
treea1ec6bac908a94cc0ac84967ae576f2cd1bd7d7c
parent43de53a76113bf5de185098d3130e316c5826594 (diff)
downloadsyslinux-87ecdfc5006737a107465f6ef27787184044e73d.tar.gz
syslinux-87ecdfc5006737a107465f6ef27787184044e73d.tar.xz
syslinux-87ecdfc5006737a107465f6ef27787184044e73d.zip
gpllib: Add default error handling (disk)
In case of an unknown error, display a default message. Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
-rw-r--r--com32/gpllib/disk/error.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/com32/gpllib/disk/error.c b/com32/gpllib/disk/error.c
index 469609b2..763dcfdc 100644
--- a/com32/gpllib/disk/error.c
+++ b/com32/gpllib/disk/error.c
@@ -1,3 +1,4 @@
+#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -119,5 +120,8 @@ void get_error(int status, char** buffer_ptr)
case 0xFF:
strncpy(buffer, "sense operation failed (hard disk)", buffer_size);
break;
+ default:
+ snprintf(buffer, buffer_size, "unknown error 0x%X, buggy bios?", status);
+ break;
}
}