aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErwan Velu <erwanaliasr1@gmail.com>2010-05-12 21:10:47 +0200
committerErwan Velu <erwanaliasr1@gmail.com>2010-05-12 21:31:13 +0200
commitbe73a9349a754d66236ee4970242fb8948c037bf (patch)
treec9a1700e8205c76b1d1d085d1978b5c88f826a86
parent0edf6f7c05ea812231bac8eb4000498ca1400519 (diff)
downloadcontrib-be73a9349a754d66236ee4970242fb8948c037bf.tar.gz
contrib-be73a9349a754d66236ee4970242fb8948c037bf.tar.xz
contrib-be73a9349a754d66236ee4970242fb8948c037bf.zip
disk: Fixing get_error() call
get_error prototype changed since this module was written
-rw-r--r--com32/modules/disk.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/com32/modules/disk.c b/com32/modules/disk.c
index 62914f47..db7f93c2 100644
--- a/com32/modules/disk.c
+++ b/com32/modules/disk.c
@@ -16,11 +16,12 @@
#include <string.h>
#include <disk/geom.h>
#include <disk/util.h>
+#include <disk/errno_disk.h>
+#include <disk/error.h>
int main(int argc __attribute__ (( unused )),
char *argv[] __attribute__ (( unused )))
{
- char* error_buffer;
int err;
struct driveinfo drive;
struct driveinfo *d = &drive;
@@ -30,17 +31,14 @@ int main(int argc __attribute__ (( unused )),
for (int disk = 0x80; disk < 0xff; disk++) {
memset(d, 0, sizeof(struct driveinfo));
d->disk = disk;
- err = get_drive_parameters(d);
+ get_drive_parameters(d);
/* Do not print output when drive does not exists */
- if (err == -1 || !d->cbios)
+ if (errno_disk == -1 || !d->cbios)
continue;
- if (err) {
- get_error(err, &error_buffer);
- printf("Error 0x%Xh while reading disk 0x%X:\n %s\n",
- err, d->disk, error_buffer);
- free(error_buffer);
+ if (errno_disk) {
+ get_error("reading disk");
continue;
}