Re: [Freedos-kernel] Creation times

2004-09-14 Thread Bart Oldeman
On Tue, 14 Sep 2004, Luchezar Georgiev wrote:

> > #include 
> > #include 
> > #include 
> >
> > 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;
> > }
>
> Thanks, Bart. Seems that as I already have written so, I AM THE FOOL HERE!
> Tested, and it's really as you say. Then why my files I worked over in
> FreeDOS were all with creation times = write times?
>
> No, I will resign from kernel development. Let me leave it to the more
> competent and young. No, seriously!!!

what is going on? I simply provided a counter-example. Everyone makes
mistakes.

People provide counter-examples to me as well, then you simply
have to accept that, you learned something new, and life goes on. Don't
see this as a personal failure. "fool.dat" was more a tongue-in-cheek
filename, basically I already had a file named foo.dat so played with
that ;)

Bart


---
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


Re: [Freedos-kernel] Creation times

2004-09-14 Thread Luchezar Georgiev
#include 
#include 
#include 
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;
}
Thanks, Bart. Seems that as I already have written so, I AM THE FOOL HERE! 
Tested, and it's really as you say. Then why my files I worked over in 
FreeDOS were all with creation times = write times?

No, I will resign from kernel development. Let me leave it to the more 
competent and young. No, seriously!!!

---
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


Re: [Freedos-kernel] Creation times

2004-09-14 Thread Luchezar Georgiev
The question is: does anyone know what does MS-DOS do?
What now unstable FreeDOS does - ZERO creation time/date and access date 
on each directory entry write. Verified.

---
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


Re: [Freedos-kernel] Creation times

2004-09-14 Thread Bart Oldeman
On Tue, 14 Sep 2004, Luchezar Georgiev wrote:

> Not speaking about access date, which
> shouldn't be set in DOS as it would mean unexpected writes.

I don't understand why access dates are different in DOS than other OSes.
If the volume is r/o you can't change the access date, sure.

I wonder though about this in RBIL:

D-216C00-
INT 21 - DOS 4.0+ - EXTENDED OPEN/CREATE
AX = 6C00h
BL = open mode as in AL for normal open (see also AH=3Dh)
bit 7: inheritance
bits 4-6: sharing mode
bit 3 reserved
bits 0-2: access mode
100 read-only, do not modify file's last-access time (DOS 7.0)

why would a 100 flag be needed if the last-access time would never be
modified?

> In summary, I
> didn't do this change only to be reverted back because Bart doesn't like
> it. Don't apply it to his stable branch, but *leave* it in our unstable,
> please.

I don't care about the branch it's in really. Neither of the two branches
are mine -- but I have write access to both. So I could have simply
reverted your change but decided to be a little more polite and tell you
why I don't agree.

I just want to say that, if I did not like it myself then I would never
have implemented it in the first place... The argumentation given by you
was given in the CVS commit -- which I don't think is valid but I
understand why in some cases you may not want to fiddle with these times
(hence the config.sys idea). Then you have another one (it was broken
anyway) by email which I can disprove.

Or do I gather from you that you absolutely *need* a kernel that is <40k
(exactly why is a mystery to me, but it looks like a ROM where everything
but exactly 39.5K is taken up by something else) and that one component
now uses one extra sector so you desperately need to shave off another
sector?

Bart


---
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


Re: [Freedos-kernel] Creation times

2004-09-14 Thread Bart Oldeman
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 
#include 
#include 

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


Re: [Freedos-kernel] Creation times

2004-09-14 Thread Aitor Santamaría Merino
Hi,
Luchezar Georgiev escribiÃ:
I wonder about those creation time set removals. It looks like your
I will consider reverting it, but a config.sys option is overkill.

Yes, it is. It'll be difficult to revert it as it leaded to numerous 
other optimisations. Besides, I already explained why I removed it. 
Why add back an useless feafure without solid argumentation? (Useless 
as it was setting creation time on each write.) Unless you can make it 
set creation times only once, which is difficult. Not speaking about 
access date, which shouldn't be set in DOS as it would mean unexpected 
writes. In summary, I didn't do this change only to be reverted back 
because Bart doesn't like it. Don't apply it to his stable branch, but 
*leave* it in our unstable, please.
The question is: does anyone know what does MS-DOS do?
Aitor
---
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


Re: [Freedos-kernel] Creation times

2004-09-13 Thread Luchezar Georgiev
I wonder about those creation time set removals. It looks like your
I will consider reverting it, but a config.sys option is overkill.
Yes, it is. It'll be difficult to revert it as it leaded to numerous other 
optimisations. Besides, I already explained why I removed it. Why add back 
an useless feafure without solid argumentation? (Useless as it was setting 
creation time on each write.) Unless you can make it set creation times 
only once, which is difficult. Not speaking about access date, which 
shouldn't be set in DOS as it would mean unexpected writes. In summary, I 
didn't do this change only to be reverted back because Bart doesn't like 
it. Don't apply it to his stable branch, but *leave* it in our unstable, 
please.

---
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


Re: [Freedos-kernel] Creation times

2004-09-13 Thread Luchezar Georgiev
Hallo Bart,
merge in some changes from UNSTABLE
If Bart doesn't like some changes, I don't mind if they're not merged them 
into "stable" ;-)

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)?

many other OS'es *do* set the creation time. Did it hurt that FreeDOS 
did this?
It didn't actually do that. FreeDOS did *always* set the creation time 
*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.

Maybe it should be a config.sys option if it did hurt in certain 
(documented) circumstances.
Too complex. I like the KISS principle (Keep It Simple, Stupid = KISS :)
which is pretty annoying if you check out on Linux -- I'll really have 
to push a patch to Steffen to allow FreeCOM not to choke on LF-ended 
batch files...
Now when AUTOEXEC.BAT is just one line ending with LF, not CRLF, FreeCOM 
happily processes it ;-)

Regards,
Lucho
---
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