From fc19c3584f94e6152085ebcb67c1a10d0c244fc5 Mon Sep 17 00:00:00 2001 From: Kenneth J Davis Date: Sun, 19 Dec 2004 22:37:16 +0000 Subject: [PATCH] fix TC build (remove signed/unsigned mix warning) git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/branches/UNSTABLE@1075 6ac86273-5f31-0410-b378-82cca8765d1b --- docs/history.txt | 2 ++ kernel/config.c | 4 ++-- sys/sys.c | 6 +++--- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/docs/history.txt b/docs/history.txt index 9318f9d..e640cba 100644 --- a/docs/history.txt +++ b/docs/history.txt @@ -380,6 +380,8 @@ - update to include all CONFIG.SYS options (except ANYDOS) * boot.asm - use static read buffer to avoid crossing 64KB boundary + * main.c + - treat block devices returning 0 units as load failure * oemboot.asm - add [optional] PC/MS DOS compatible boot sector * sys.c - incorporate changes from/for DR-DOS enhancement project diff --git a/kernel/config.c b/kernel/config.c index 48ea048..a2f6cd4 100644 --- a/kernel/config.c +++ b/kernel/config.c @@ -1444,8 +1444,8 @@ STATIC BOOL LoadDevice(PCStr p, VFP top, int mode) { struct dhdr FAR *dhp = MK_PTR(struct dhdr, base, next); /* init_device returns FALSE on SUCCESS, TRUE otherwise */ - if ((ret = init_device(dhp, szBuf, mode, &top))) - break; + ret = init_device(dhp, szBuf, mode, &top); + if (ret) break; next = FP_OFF(dhp->dh_next); diff --git a/sys/sys.c b/sys/sys.c index dfa5b60..c6ca0b7 100644 --- a/sys/sys.c +++ b/sys/sys.c @@ -987,7 +987,7 @@ void correct_bpb(struct bootsectortype *default_bpb, } /* reads in boot sector (1st SEC_SIZE bytes) from file */ -void readBS(const char *bsFile, BYTE *bootsector) +void readBS(const char *bsFile, UBYTE *bootsector) { if (bsFile != NULL) { @@ -1018,7 +1018,7 @@ void readBS(const char *bsFile, BYTE *bootsector) /* write bs in bsFile to drive's boot record unmodified */ void restoreBS(const char *bsFile, int drive) { - unsigned char bootsector[SEC_SIZE]; + UBYTE bootsector[SEC_SIZE]; if (bsFile == NULL) { @@ -1047,7 +1047,7 @@ void restoreBS(const char *bsFile, int drive) } /* write bootsector to file bsFile */ -void saveBS(const char *bsFile, BYTE *bootsector) +void saveBS(const char *bsFile, UBYTE *bootsector) { if (bsFile != NULL) {