[Freedos-kernel] Re: [Freedos-cvs] kernel/kernel fatdir.c,1.40,1.41 etc

2004-03-22 Thread Luchezar Georgiev
if (new_diroff == 65535) Borland C++ complains here. Change the constant to 65535UL (see patch below). Although Borland says constant is long, it's enough to change it to 65535U, not UL. Lucho diff -ruN cvs/kernel/kernel/fatdir.c src/kernel/kernel/fatdir.c --- cvs/kernel/kernel/fatdir.c

[Freedos-kernel] Re: kernel/kernel fatfs.c,1.52,1.53 proto.h,1.50,1.51 memmgr.c,1.27,1.28

2004-03-22 Thread Eric Auer
Hi, about add_far() pointer normalization: I think it would be better to normalize earlier. If you have a pointer, you normally have a pointer to a STRUCTURE. If the end of the structure ends up with an offset 0x then having the POINTER normalized is not enough. So how do you check the SIZE

Re: [Freedos-kernel] Re: [Freedos-cvs] kernel/kernel fatdir.c,1.40,1.41 etc

2004-03-22 Thread Arkady V.Belousov
Hi! 22--2004 14:47 [EMAIL PROTECTED] (Luchezar Georgiev) wrote to FreeDOS-kernel [EMAIL PROTECTED]: if (new_diroff == 65535) Borland C++ complains here. Change the constant to 65535UL (see patch below). Hm, don't see letter with these words. LG Although Borland says constant is long,

Re: [Freedos-kernel] Re: kernel/kernel fatfs.c,1.52,1.53 proto.h,1.50,1.51 memmgr.c,1.27,1.28

2004-03-22 Thread Bart Oldeman
On Mon, 22 Mar 2004, Eric Auer wrote: Hi, about add_far() pointer normalization: I think it would be better to normalize earlier. If you have a pointer, you normally have a pointer to a STRUCTURE. If the end of the structure ends up with an offset 0x then having the POINTER normalized is

Re: [Freedos-kernel] Re: Last change introduced an unknown unit delete bug

2004-03-22 Thread Bart Oldeman
On Mon, 22 Mar 2004, Luchezar Georgiev wrote: :\elv_3e5.1 I mean i:\elv_3e5.1 Sorry for my typo! should be fixed now. remove_lfn_entries() calls dir_read with the offset == -1 which is not possible for normal directories (. and ..) but is possible for root directories. So the 65535 check

Re: [Freedos-kernel] Re: kernel/kernel fatfs.c,1.52,1.53 proto.h,1.50,1.51 memmgr.c,1.27,1.28

2004-03-22 Thread Arkady V.Belousov
Hi! 22--2004 14:23 [EMAIL PROTECTED] (Bart Oldeman) wrote to [EMAIL PROTECTED]: BO add_far is only used at a few select places where we want to have the BO offset part as low as possible. Nothing to do with structures but BO everything to do with potentially large file reads, with read chunk, BO

Re: [Freedos-kernel] Last change introduced an unknown unit delete bug

2004-03-22 Thread Luchezar Georgiev
Bart, unfortunately your very last change (scaling and shortening the directory entry pointer) introduced a bug! When I start my elvis editor (a vi clone) and exit it, it can't delete its temporary file ELV_3E5.1 from my XMSDSK RAM disk where is my temporary directory. 4DOS fails to delete it

Re: [Freedos-kernel] Re: kernel/kernel fatfs.c,1.52,1.53 proto.h,1.50,1.51 memmgr.c,1.27,1.28

2004-03-22 Thread tom ehlert
Hello Arkady, AVB Then rename add_far into normalize_ptr and remove misleading. noone is going to rename functions because you don't like the names. AVB Also, AVB I may offer next code to always perform normalization: It's there for some specific purpose. AVB (BTW, is protection AVB from

Re: [Freedos-kernel] Re: Last change introduced an unknown unit bug

2004-03-22 Thread Bart Oldeman
On Mon, 22 Mar 2004, Luchezar Georgiev wrote: But what if it was the first entry in the root directory? Then the new_diroff++ in dir_read() will make it -1! remove_lfn_entries() checks for fnp-f_diroff == 0. The first entry can't have any LFN entries connected to it. Bart

Re: [Freedos-kernel] LF written to the file being read?

2004-03-22 Thread Luchezar Georgiev
But what if it was the first entry in the root directory? Then the new_diroff++ in dir_read() will make it -1! remove_lfn_entries() checks for fnp-f_diroff == 0. The first entry can't have any LFN entries connected to it. Of course! I should have seen that. This is so for lfn_dir_read() too. I

[Freedos-kernel] Re: [Freedos-cvs] kernel/kernel fatdir.c,1.41,1.42 fatfs.c,1.54,1.55

2004-03-22 Thread Arkady V.Belousov
Hi! 22--2004 15:43 [EMAIL PROTECTED] (Bart Oldeman) wrote to [EMAIL PROTECTED]: BO + /* can't have more than 65535 directory entries BO + remove lfn entries may call us with new_diroff == -1 BO + for root directories though */ BO + if (!fnp-f_flags.f_droot new_diroff = 65535U) BO +

[Freedos-kernel] Re: [Freedos-cvs] kernel/kernel fatdir.c,1.42,1.43 fatfs.c,1.56,1.57

2004-03-22 Thread Arkady V.Belousov
Hi! 22--2004 16:56 [EMAIL PROTECTED] (Bart Oldeman) wrote to [EMAIL PROTECTED]: BO +++ fatfs.c 22 Mar 2004 16:56:33 - 1.57 BO +xfr_cnt = count (ULONG) secsize - boff ? BO +(UWORD) count : secsize - boff; I not check this, but, probably, better if there will no cast to

Re: [Freedos-kernel] Re: kernel/kernel fatfs.c,1.52,1.53 proto.h,1.50,1.51 memmgr.c,1.27,1.28

2004-03-22 Thread Bart Oldeman
On Mon, 22 Mar 2004, tom ehlert wrote: AVB (BTW, is protection AVB from wrapping HMA pointer into IVT by replacing wrapping into start of HMA AVB worth of code?) a working kernel is worth a lot of code (even if you don't see the reason immediately) HANDS OFF THE KERNEL, please. in the end

[Freedos-kernel] bootfix 1.4

2004-03-22 Thread Arkady V.Belousov
Hi! With help of Michael Devore, on his site placed version 1.4 of BOOTFIX. This version is now compilable both by Borland C and OpenWatcom. It shows slightly more information (to ease using logs even without dumps), before reading BPB added reseting disk (look like this is sometime required