--- Phillip Susi <psusi(a)cfl.rr.com> wrote:
> Steven Edwards wrote:
> > We have PSEH which can be used.
> >
> > Thanks
> > Steven
>
> PSEH?
We have a macro based SEH implementation we are using in ReactOS called PSEH for Portable SEH.
Hyperion wrote it and it seems to work with almost ever compiler thrown at it. It is not syntax
compatible with MS-SEH but some people have been working to develop p(retty)pseh which should be.
Look in reactos/lib/pseh and grep the source tree. Its used in ntoskrnl, win32k, afd?, and others.
Thanks
Steven
__________________________________
Do you Yahoo!?
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/
NTSTATUS DoSomething()
{
NSTATUS Status;
...
Status = NtXXX();
if (!NT_SUCCESS(Status))
goto done;
Status = NtYYY();
if (!NT_SUCCESS(Status))
goto cleanXXX;
Status = NtZZZ();
if (!NT_SUCCESS(Status))
goto cleanYYY;
cleanZZZ:
cleanupZZZ();
cleanYYY:
cleanupYYY();
cleanXXX:
cleanupXXX();
done:
return Status;
}Thomas
NTSTATUS DoSomething()
{
NSTATUS Status = NtXXX();
if (NT_SUCCESS(Status)) {
Status = NtYYY();
if (!NT_SUCCESS(Status))
cleanupXXX();
Status = NtZZZ();
if (!NT_SUCCESS(Status))
cleanupYYY();
}
return Status;
}
i think thats the most simple and easy to read
but in the end is´ent it not a littel waste of time
discusse old functions their need rewrite anyway..?
Thomas
Hi,
--- Phillip Susi <psusi(a)cfl.rr.com> wrote:
> How is it not readable? I think it is MUCH better than the original
> code. You don't have a half dozen lines of (mostly duplicated) cleanup
> code after every call, but what you're calling and what you're passing
> to it are still quite clear. Like I said though, it still isn't as
> ideal as SEH, but it's not the terrible mess the original code was. If
> you have any suggestions on how to make it even more clean, I'm all ears.
We have PSEH which can be used.
Thanks
Steven
__________________________________
Do you Yahoo!?
Read only the mail you want - Yahoo! Mail SpamGuard.
http://promotions.yahoo.com/new_mail
Hi,
with my last changes it is possible to install ros from the boot cd and
select the floppy as boot device. Currently there exist three problems.
After selecting the floppy as boot medium it is shown a dialog box which
does mean, there is no disk inserted. A second try detect the disk. The
installer copies all files to the floppy disk. After trying to restart
the computer, ros hangs. I must manually reset the pc. The floppy disk
is still inserted at this point. The pc does boot up, accessing the
floppy disk, shows 'Loading FreeLoader...' and shows 'Disk error \nPress
any key". Pressing a key results in the same message. If I remove and
insert the disk again, I can load freeloader from the floppy disk and it
does boot reactos. It seems, that the bios isn't able to initialize the
floppy controller correctly after reactos was running. I've added a
shutdown procedure in floppy.sys which resets the floppy controller over
the DSR register, but this doesn't help. Has anyone an idea what is
wrong?
- Hartmut
Well, I finally solved my problems with getting freeldr to boot from a
hard drive. The first is a problem with fat.bin itself. Early during
it's execution it checks to see if the boot sector header specifies a
device ID of 0xff, and if so, it uses the device ID the bios passes in
CL when it invokes the boot sector, otherwise it uses the device ID in
the boot sector header. The device ID field of the boot sector is
inherently unreliable and should NEVER be used. In my case mtools was
leaving it as it was in fat.bin, which is 0, so it was trying to access
the floppy instead of the hard disk. I have fixed this by removing the
check to see if the field is 0xff, so the code will always use the
device passed by the bios.
The second problem was far more stupid. mtools was not specifying
O_BINARY when opening the boot sector template file, and as a result,
cygwin was translating newlines, so it clobbered the boot sector.
I'm all set to check in the fix to fat.asm, but I was never asked by
subversion ( tortoise client ) to log in, so I assume it just used anon
or something. How do I tell subversion to log me in as me?
A simpler fix would be to a change of the BootDrive value to 0xFF.
As you said, the current value is 0,
but thats by design,
since all the values have been filled for a 1.44M diskette.
Even the File System ID could have been set differently,
since the neutral value 'FAT ' is allowed here.
--- Phillip Susi <psusi(a)cfl.rr.com> wrote:
> Well, I finally solved my problems with getting freeldr to boot from a
> hard drive. The first is a problem with fat.bin itself. Early during
> it's execution it checks to see if the boot sector header specifies a
> device ID of 0xff, and if so, it uses the device ID the bios passes in
> CL when it invokes the boot sector, otherwise it uses the device ID in
> the boot sector header. The device ID field of the boot sector is
> inherently unreliable and should NEVER be used. In my case mtools was
> leaving it as it was in fat.bin, which is 0, so it was trying to access
> the floppy instead of the hard disk. I have fixed this by removing the
> check to see if the field is 0xff, so the code will always use the
> device passed by the bios.
Kind regards,
Usurp (aka Sylvain Petreolle)
humans are like computers,
yesterday the BIOS was all
- today its just a word
phreak(a)svn.reactos.com wrote:
>Fixed freeldr fat16 boot sector to use the bios provided boot device number instead of the ( usually invalid ) one in the boot sector header.
>
>
Could you please fix that also in the fat32 bootsector?
Best Regards,
Thomas