FAT kerdes
Moczik Gabor
progzmaster at freemail.hu
Fri Apr 2 00:12:20 CEST 2004
elektro wrote:
> Mi lenne, ha a fat16 root dir FAT bejegyzesebe beirnek egy masik clustert,
> es ott folytatnam a directoryt? Nem ertem hogy ez miert lehetetlen.
> De biztos van valami oka...
> Errol jut eszembe: a dir vege ugye ugy jelzodik, hogy az utolso entry
> utani entry elso bajtja nulla. Mindig kell ilyen bejegyzes, akkor is,
> ha emiatt uj clustert kell nyitni? A root dirben is ilyennek kell lenni
http://jan.netcomp.monash.edu.au/ssw/files/internals.html
A Linked list es az Index utan ir valamit rola.
A microsoft dokumentacioja:
http://www.microsoft.com/hwdev/download/hardware/FATGEN103.doc
> Akkor inkabb a defragmentalas... Ez eleg kemeny, van munkaja a fat
> handlereknek! Nem is tudom hogy csinaljam meg, meg egy buffer kene,
> csak nincs hely a RAM-ban, igy viszont szet fogja cseszni szegeny CF-et
> a sok felesleges irogatassal :(
> Ilyenkor nyilvan elvesznek a torolt fajlok, tehat undelete nem lehetseges
> tobbet. Ezert lehet hogy a 'profi' PC-s fat handlerek nem defragmentalnak.
Hat a FAT nem igazan irastakarekos, az biztos. Nem tudom mi lesz belole,
mindenkeppen FAT kell, kompatibilitasi okokbol?
Ha nem, akkor van direkt flash-ra optimalizalt filerendszer, valami 'jffs'
vagy mi...
> Ha en akarok csinalni egy hasonlo nevu fajlt, es pont van megfelelo szamu
> egybefuggo szabad slot mondjuk az 1. es 2. file kozott, akkor a MICROS~5 az
> 1 es 2 kozott lesz, ez nem baj?
Talaltam egy ilyet (linux_kernel_source/Documentation/filesystems/vfat.txt):
***************
1) Positioning. Slots for a file always immediately proceed
their corresponding 8.3 directory entry. In addition, each
slot has an id which marks its order in the extended file
name. Here is a very abbreviated view of an 8.3 directory
entry and its corresponding long name slots for the file
"My Big File.Extension which is long":
<proceeding files...>
<slot #3, id = 0x43, characters = "h is long">
<slot #2, id = 0x02, characters = "xtension whic">
<slot #1, id = 0x01, characters = "My Big File.E">
<directory entry, name = "MYBIGFIL.EXT">
Note that the slots are stored from last to first. Slots
are numbered from 1 to N. The Nth slot is or'ed with 0x40
to mark it as the last one.
2) Checksum. Each slot has an "alias_checksum" value. The
checksum is calculated from the 8.3 name using the
following algorithm:
for (sum = i = 0; i < 11; i++) {
sum = (((sum&1)<<7)|((sum&0xfe)>>1)) + name[i]
}
3) If there is free space in the final slot, a Unicode NULL (0x0000)
is stored after the final character. After that, all unused
characters in the final slot are set to Unicode 0xFFFF.
inally, note that the extended name is stored in Unicode. Each Unicode
haracter takes two bytes.
*****************
Itt is nezelodhetsz:
http://surprise.sourceforge.net/doc/tech-49.html
--
((( Móczik Gábor )))--((( hu <- DOT <- freemail <- AT <- progzmaster )))
((( Debian unstable )))-((( Kernel 2.4.20 )))-((( Celeron466 / 128Mb )))
More information about the Elektro
mailing list