English Amiga Board

English Amiga Board (https://eab.abime.net/index.php)
-   Coders. General (https://eab.abime.net/forumdisplay.php?f=37)
-   -   Checking to see if an ADF is FFS (https://eab.abime.net/showthread.php?t=108383)

jasonver2.0 01 October 2021 05:05

Checking to see if an ADF is FFS
 
Hello
In an ADF, how does one find out if a disks filesystem is FFS or not please?

I found the byte position for the disk label etc

Thanks

(Possibly the wrong section -- sorry)

Steady 01 October 2021 06:51

The first 4 bytes of a boot block (first block) will contain the following:
'D', 'O', 'S', <number>

Where <number> represents the Amiga FileSystem type the disk is formatted in. Note that the numbers below are actual numbers, not ASCII representations of numbers:

0 - OFS
1 - FFS
2 - OFS International
3 - FFS International
4 - OFS Directory Cache
5 - FFS Directory Cache
6 - OFS Long File Name
7 - FFS Long File Name

jasonver2.0 01 October 2021 07:08

Hello Steady

Oh sorry, not in the bootblock - i know that bit ;)

In the disk itself - if one puts a FFS bootblock on an OFS disk or visa versa a crash happens :)

Exodous 01 October 2021 09:05

The 'DOSx' header in the bootblock is the identifier.

If you format a blank disk as OFS and one as FFS, then compare the two, the only differences are the 'DOSx' in the bootblock and the creation dates and corresponding checksum in the root block, there are no other differences.

jasonver2.0 01 October 2021 12:29

Oh fair enough thank you

I was hoping to figure out a way to tell if a disk was FFS so it would warn of a OFS bootblock install etc

Thanks :)

Toni Wilen 01 October 2021 12:42

You can usually check it if it has any files: It is OFS if data blocks have valid checksum and valid OFS only identifier fields. But this can't be done without parsing directory structure. Which isn't trivial.

Check also file size (OFS stores 488 bytes per block, FFS stores full 512 bytes), someone might have written OFS data block dump(s) as a file on FFS disk :)


All times are GMT +2. The time now is 16:49.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.

Page generated in 0.04494 seconds with 11 queries