On Mon, 13 Sep 2004, Luchezar Georgiev wrote: > Bart wrote: > > I wonder about those creation time set removals. It looks like your > > removing a useful feature here. Sure a reason given is "MSDOS 7.10 > > doesn't do this". Well, I say, who cares about this specific DOS, > > Isn't *this* specific OS what we try to emulate as closely as possible > (including even its bugs)?
no. We want to be compatible with it. That's a subtle but important difference. It means that we should feel free to implement features in FreeDOS not present in any other DOS, as long as it doesn't break existing DOS programs (which of course proved harder than it seems :( ). The reason why the FAT32 version reports 7.10 is simply because "5.00" would mislead some programs into believing that FAT32 support is not present. > It didn't actually do that. FreeDOS did *always* set the creation time > *equal* to the write time. No way. init_direntry set the creation time equal to the write time but only for created or replaced files (status != S_OPENED), and in mkdir. The place where write time starts to be different from creation time is in fnp->f_dir.dir_time = dos_gettime(); fnp->f_dir.dir_date = dos_getdate(); in dos_close(). Since you sound so confident I wrote a small program that creates a file where the creation time is not equal to the write time. > So the creation time didn't hold even a single > of bit of information and was therefore misleading. Making it set the > creation time *only* once, when a file is created, is surprisingly > difficult (I tried and failed), and is not required for a DOS anyway. > Let's not try to be bigger catholics than the pope. There's nothing religious about this. It's simply a feature. Bart #include <fcntl.h> #include <io.h> #include <dos.h> int main(void) { int fd = open("fool.dat", O_WRONLY|O_CREAT|O_TRUNC); write(fd, "hello", 5); close(fd); sleep(2); fd = open("fool.dat", O_WRONLY); write(fd, "hello bye", 9); close(fd); return 0; } ------------------------------------------------------- This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 Project Admins to receive an Apple iPod Mini FREE for your judgement on who ports your project to Linux PPC the best. Sponsored by IBM. Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php _______________________________________________ Freedos-kernel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/freedos-kernel