aboutsummaryrefslogtreecommitdiffstats
path: root/com32/chain/partiter.h
diff options
context:
space:
mode:
authorMichal Soltys <soltys@ziu.info>2014-06-29 21:41:40 +0200
committerH. Peter Anvin <hpa@zytor.com>2014-08-26 18:07:18 -0700
commit69e1b85fdee3db74cadf2e61e9ab34a9f70ab981 (patch)
treee31f22198a10564c6409be5f0c3f6272556adb24 /com32/chain/partiter.h
parent9cffba471b6a41f363abc68509f112d9a85c4872 (diff)
downloadsyslinux-69e1b85fdee3db74cadf2e61e9ab34a9f70ab981.tar.gz
syslinux-69e1b85fdee3db74cadf2e61e9ab34a9f70ab981.tar.xz
syslinux-69e1b85fdee3db74cadf2e61e9ab34a9f70ab981.zip
chain/partiter: adjust error reporting
Use <0 for errors, 0 for normal state, and >0 for clean completion. In future this would be necessary if it's decided to make partiter a generic lib (similar to disklib) - though it has to be quieted first and provide strerr()-like functionality in place of its verbosity. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'com32/chain/partiter.h')
-rw-r--r--com32/chain/partiter.h7
1 files changed, 1 insertions, 6 deletions
diff --git a/com32/chain/partiter.h b/com32/chain/partiter.h
index 13dec848..d01a6500 100644
--- a/com32/chain/partiter.h
+++ b/com32/chain/partiter.h
@@ -42,7 +42,7 @@
/* status */
-enum {PI_OK, PI_DONE, PI_INSANE, PI_ERRLOAD};
+enum {PI_ERRLOAD = -31, PI_INSANE, PI_OK = 0, PI_DONE};
/* flags */
@@ -103,11 +103,6 @@ extern const struct itertype * const typeraw;
struct part_iter *pi_begin(const struct disk_info *, int flags);
void pi_del(struct part_iter **);
-static inline int pi_errored(struct part_iter *iter)
-{
- return iter->status > PI_DONE;
-}
-
/* inline virtuals */
static inline int pi_next(struct part_iter *iter)
{