flat assembler
Message board for the users of flat assembler.

Index > MenuetOS > Directory routines for function 58

Goto page Previous  1, 2, 3, 4  Next
Author
Thread Post new topic Reply to topic
Madis731



Joined: 25 Sep 2003
Posts: 2140
Location: Estonia
Madis731
How does 9x/NT do it (I mean 95, 98, NT, 2k, XP, ...)?
are they only deleting the folder's header? so files are still there
because it really seems to be faster under graphical OS Razz
Post 11 Nov 2004, 09:03
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger Reply with quote
mike.dld



Joined: 03 Oct 2003
Posts: 235
Location: Belarus, Minsk
mike.dld
I think they just modify DIRTREE & FATs marking sectors as 'free'. That's why there're so many utilities for files recovery.
Post 11 Nov 2004, 09:55
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
Barak



Joined: 25 Jul 2003
Posts: 22
Location: Nesher, Israel
Barak
Yes, this is what i meant. it should be in the kernel becuz it is an addition to the deletion system. But if we will had recycle bin, maybe we could remove it from there....
Post 11 Nov 2004, 12:40
View user's profile Send private message ICQ Number Reply with quote
ATV



Joined: 31 Aug 2004
Posts: 109
Location: Finland
ATV
Updated fat32.inc set_FAT/get_FAT and disk cache rewritten

Removedir almost 3 times faster on fat32 and almost 2 times faster on fat16.
Also disk cache works better
Post 17 Nov 2004, 09:18
View user's profile Send private message Reply with quote
ATV



Joined: 31 Aug 2004
Posts: 109
Location: Finland
ATV
New subfunction and more error codes

function 58 / subfunction 15 = get_disk_info

get_disk_info return current hd cluster info thru dirnamez field
dword [dirnamez+0] = cluster size in bytes
dword [dirnamez+4] = total clusters
dword [dirnamez+8] = free clusters

disk_size = cluster_size * total_clusters
free_size = cluster_size * free_clusters

New error codes for function 58
; eax = 8 : disk full
; eax = 9 : fat table corrupted
; eax = 10 : access denied


Last edited by ATV on 23 Nov 2004, 08:30; edited 1 time in total
Post 19 Nov 2004, 08:06
View user's profile Send private message Reply with quote
mike.dld



Joined: 03 Oct 2003
Posts: 235
Location: Belarus, Minsk
mike.dld
Hi, ATV!

If you still don't know what to do next, I'd be much appreciate if you'll implement BETTER WAY of partitions handling. What I mean is to delete partition selection function and make 58th and others to get partition number from path, e.g. /hd/1/ is 1st partition (c:), /hd/3/ is 3rd (e:) etc. Hope you like this idea.
Post 22 Nov 2004, 10:37
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
SPTH



Joined: 24 Jul 2004
Posts: 91
SPTH
wow, nice code, really!
Will this code released with MenuetOS 0.78 pre 4 +?
I really hope so!

greets, ...
Post 22 Nov 2004, 22:12
View user's profile Send private message Reply with quote
Octavio



Joined: 21 Jun 2003
Posts: 366
Location: Spain
Octavio
mike.dld wrote:
Hi, ATV!

If you still don't know what to do next, I'd be much appreciate if you'll implement BETTER WAY of partitions handling. What I mean is to delete partition selection function and make 58th and others to get partition number from path, e.g. /hd/1/ is 1st partition (cSmile, /hd/3/ is 3rd (eSmile etc. Hope you like this idea.

Instead of partition number it would be better to use the partition name
so you have the same location for a file even if you move your hard disk to another computer.
The partition name can be found in the boot sector, and also in the root directory (optional).
Post 23 Nov 2004, 01:30
View user's profile Send private message Visit poster's website Reply with quote
mike.dld



Joined: 03 Oct 2003
Posts: 235
Location: Belarus, Minsk
mike.dld
But this means Menuet users will need to name all the partitions, otherwise they'll be unable to work with some of them w/o names... and, numbering is just as alpha names (e.g. in Windows) but more convinient - AA:\ in Windows, /hd/27/ in Menuet Wink
Post 23 Nov 2004, 02:37
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
ATV



Joined: 31 Aug 2004
Posts: 109
Location: Finland
ATV
Updated fat32.inc don't allow overwrite directory with file

Is remove whole directory structure too dangerous? Should i remove it?

Note: Original read_file was return end_of_file with code 5 (now 6) and not_found with code 6 (now 5) they are fixend now, but tinypad don't like it.

And yes i have think about big changes to handle different partitions. LBA read uses "number" like it is hd_base. Problem is that there is hd_base AND hd_partition, but there is only one level for numbers /hd/"number"/path/file. Maybe counting all hd's and partitions to go "1"... or something like it. That need identify if hd exist at startup.


Last edited by ATV on 29 Nov 2004, 08:07; edited 1 time in total
Post 23 Nov 2004, 08:32
View user's profile Send private message Reply with quote
mike.dld



Joined: 03 Oct 2003
Posts: 235
Location: Belarus, Minsk
mike.dld
So if all partitions are /hd/1/ then what for /1/ is? We could make it /hd/... I think that /1/ means something, isn't it?
Post 23 Nov 2004, 22:30
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
ATV



Joined: 31 Aug 2004
Posts: 109
Location: Finland
ATV
/1/ is needed, but currently not used (exception, LBA read use it as hd_base = pri.master - sec.slave). Maybe array to keep fat_type and all partition info for each partition. After that "numbers" can handle one physical hd set via setup. When setting hd_base collect all partition info into array (fat_type / cluster info / ...). Then expand path can set right partition depending on "number", just copy partition info. Big problem is all applications that uses /hd/1/ and your program is in /hd/2/ they can't find data/external files. Maybe new number "0" or "." to use last used partition "/hd/0/" or "/hd/./". New problem what if another program uses different partition between calls?

I don't know what is best solution, i have only 2 months experience of Menuet. I have not found any future guidelines how Menuet should handle hd_base/partitions.
Post 26 Nov 2004, 08:06
View user's profile Send private message Reply with quote
ATV



Joined: 31 Aug 2004
Posts: 109
Location: Finland
ATV
Important: Append directory bug fix

There was bug (converting cluster -> sector) when existing directory need new cluster. It has been there since my very first fat32.inc. It can happend when directory has 254 files in 4k cluster size (510 files in 8k) and new file/dir is created.

Bug can overwrite data.
Run Scandisk to see if your disk is ok


I hope that didn't cause any troubles. I have too bad memory, maybe i have to reserve room in old people's home.


Last edited by ATV on 04 Dec 2004, 08:08; edited 1 time in total
Post 29 Nov 2004, 08:09
View user's profile Send private message Reply with quote
Madis731



Joined: 25 Sep 2003
Posts: 2140
Location: Estonia
Madis731
You warned us that these are only test versions so you don't have to feel sorry. I also hope that everyone's HDDs are ok, but I namely didn't use your project until I would find it ripe. Another fact is that I have an NTFS so...
But I'll fix myself an old computer some day and stuff it with some HDD and video so it could only be used for MenuetOS - then any crash can be delt with ease. I'd have to consult my father to let me drag some scrap material home from the work Razz
Post 29 Nov 2004, 09:21
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger Reply with quote
Ivan Poddubny



Joined: 21 Sep 2003
Posts: 32
Location: Yaroslavl, Russia
Ivan Poddubny
Oh sh*t! It corrupted a lot of files on my disk Sad
Post 29 Nov 2004, 18:23
View user's profile Send private message Visit poster's website Reply with quote
Wildwest



Joined: 13 Sep 2004
Posts: 100
Location: Russia
Wildwest
ATV, you should e-mail your stuff directly to Mike Hibbett because he don't read forums last month.
Post 01 Dec 2004, 11:14
View user's profile Send private message Reply with quote
ATV



Joined: 31 Aug 2004
Posts: 109
Location: Finland
ATV
Important: New bug fix, again

Ivan, i am very sorry about disk corrupt.

About new bug, there was bug when delete file, it was deleted like directory. Is removedir allowed and is it directory tested wrong way, i can't believe my eyes.

Bug can corrupt FAT table with clearing extra clusters.
Run Scandisk to see if your disk is ok


Is there anybody reading/testing fat32.inc/fs.inc to find errors? This feels little too big job for me.

I have used DOS over 10 years and i have not realize that volume label can have same 8+3 name as file or directory, that bug is also fixed. Should there be subfunction for Menuet to get/set volume label or is it applications job?


Description: Updated fat32.inc for MeOS v0.78p3
Download
Filename: FAT32FS.ZIP
Filesize: 21.02 KB
Downloaded: 1133 Time(s)

Post 04 Dec 2004, 08:09
View user's profile Send private message Reply with quote
profkid13



Joined: 21 Aug 2003
Posts: 111
profkid13
ATV wrote:

Is there anybody reading/testing fat32.inc/fs.inc to find errors? This feels little too big job for me.

I'll test it this afternoon and post here when i find bugs

ATV wrote:

Should there be subfunction for Menuet to get/set volume label or is it applications job?


i would say subfunction: this code is gonna be used more than once i gues Razz
Post 04 Dec 2004, 11:02
View user's profile Send private message Reply with quote
profkid13



Joined: 21 Aug 2003
Posts: 111
profkid13
hmm reading files was ok but when i tried to save i got hd time out Confused
I'll check later today with the original kernel (it's the first time i use this hd in menuetos...)

I had to reboot so wasnt able to see if making dirs etc is ok..

edit:
same prob with the original kernel..

what could be going wrong?
i'm using meneutos 078 pre 3 and an old western digital caviar hd of 324 MB

i can read from it but not write to it Confused

another edit:
menuetos did write a svreen.raw to my hd but it was corrupted: this is what chkdisk says:
\screen.RAW holds an invalid shortcut.
The size of \screen.RAW is invalid.
There are problems with the filesystem.
Post 05 Dec 2004, 11:52
View user's profile Send private message Reply with quote
sonny73044



Joined: 08 Dec 2004
Posts: 28
Location: Oklahoma,USA
sonny73044
Tested it today, had to do some backups, and everything went well.
Excellent in fact Very Happy MAKDIR did everything it should have and more.
RENAME & DISKINFO worked as expected also.

I did notice that you could not set the hd params in kernel.asm/; device addresses
without then resetting them using the settings program (don't need it anyway)

I even deleted the dir "C:\Documents and Settings\Administrator.REACTOS"
without any ill effects

Good Job


Description: In Action
Filesize: 102.14 KB
Viewed: 7619 Time(s)

fat32fs.jpg


Post 08 Dec 2004, 05:24
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page Previous  1, 2, 3, 4  Next

< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.

Website powered by rwasa.