aboutsummaryrefslogtreecommitdiffstats
path: root/com32/gplinclude/disk/read.h
diff options
context:
space:
mode:
authorPierre-Alexandre Meyer <pierre@mouraf.org>2009-04-21 09:56:11 -0700
committerPierre-Alexandre Meyer <pierre@mouraf.org>2009-04-21 09:56:11 -0700
commitbdeb4237ed17d2deab8ecf3cb95721047731cc3c (patch)
treeab4f653c7f7577fb951b2a8acbac6512733fb863 /com32/gplinclude/disk/read.h
parent731660cc2060f3bfdf5cd916bce1573985df6408 (diff)
downloadsyslinux-bdeb4237ed17d2deab8ecf3cb95721047731cc3c.tar.gz
syslinux-bdeb4237ed17d2deab8ecf3cb95721047731cc3c.tar.xz
syslinux-bdeb4237ed17d2deab8ecf3cb95721047731cc3c.zip
gpllib: Propagate error codes in disk library
It is worth propagating read/write error codes back to the caller. He can pass NULL to ignore them, or an int* that will be populated. To decode it, one can use the get_error function (see disk/error.c). Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Diffstat (limited to 'com32/gplinclude/disk/read.h')
-rw-r--r--com32/gplinclude/disk/read.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/com32/gplinclude/disk/read.h b/com32/gplinclude/disk/read.h
index 79c79524..fee10daf 100644
--- a/com32/gplinclude/disk/read.h
+++ b/com32/gplinclude/disk/read.h
@@ -1,7 +1,10 @@
#ifndef _READ_H_
#define _READ_H_
-void *read_mbr(int drive);
-void *dev_read(int drive, unsigned int lba, int sectors);
-void *read_sectors(struct driveinfo* drive_info, const unsigned int lba,
- const int sectors);
+
+#include <disk/geom.h>
+
+void *read_mbr(int, int*);
+void *dev_read(int, unsigned int, int, int*);
+void *read_sectors(struct driveinfo*, const unsigned int,
+ const int, int *);
#endif /* _READ_H */