From f5696a4a7e284f745656f255c4c5d646f7c91261 Mon Sep 17 00:00:00 2001 From: Bart Oldeman Date: Thu, 11 Jun 2009 13:25:32 +0000 Subject: [PATCH] For read/write don't update sft_posit in dosfns.c anymore so fatfs.c takes care of it. git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1437 6ac86273-5f31-0410-b378-82cca8765d1b --- kernel/dosfns.c | 8 +------- kernel/fatfs.c | 2 +- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/kernel/dosfns.c b/kernel/dosfns.c index 50c2ead..4fe8964 100644 --- a/kernel/dosfns.c +++ b/kernel/dosfns.c @@ -296,13 +296,7 @@ long DosRWSft(int sft_idx, size_t n, void FAR * bp, int mode) return rc; } /* /// End of additions for SHARE - Ron Cemer */ - { - long XferCount = rwblock(sft_idx, bp, n, mode); - if (XferCount < 0) - return XferCount; - s->sft_posit += XferCount; - return XferCount; - } + return rwblock(sft_idx, bp, n, mode); } COUNT SftSeek(int sft_idx, LONG new_pos, unsigned mode) diff --git a/kernel/fatfs.c b/kernel/fatfs.c index e8fe010..c5afbc9 100644 --- a/kernel/fatfs.c +++ b/kernel/fatfs.c @@ -1812,7 +1812,7 @@ STATIC void fnode_to_sft(f_node_ptr fnp) sftp->sft_diridx = fnp->f_diridx; sftp->sft_dirsector = fnp->f_dirsector; sftp->sft_dcb = fnp->f_dpb; - /* Do not update sftp->sft_posit (fnp->f_offset): dosfns.c takes care of it */ + sftp->sft_posit = fnp->f_offset; sftp->sft_cuclust = fnp->f_cluster; sftp->sft_relclust = (UWORD)fnp->f_cluster_offset; #ifdef WITHFAT32