Sys:System/Format command split...

AmigaOS users can make feature requests in this forum.
Post Reply
Belxjander
Posts: 314
Joined: Mon May 14, 2012 10:26 pm
Location: 日本千葉県松戸市 / Matsudo City, Chiba, Japan
Contact:

Sys:System/Format command split...

Post by Belxjander »

Can the "Sys:System/Format" program file become a wrapper/selector for multiple "FileSystem Generator" tools?

"FileSystem Generator" tools can use a standard ReadArgs() call for parameters.
And the "Sys:System/Format" program can then be used to select which FileSystem to apply to a given partition.

The only major question of complexity I can see is how to query a generators readargs to obtain any "Extended Options" listing...
as the "dos.library/ReadArgs()" does respond to "?" for providing the ReadArgs template used,
Would this be parse-able to produce a set of "GUI options" within the "Sys:System/Format" command itself?

Additional questions would be ...
Where could any "FileSystem Generators" be stored without conflicts?
What naming scheme for "FileSystem Generators"?

Does anyone else see this as a practical mechanism that can be achieved with minimal modification to the OS as a whole?
to my knowledge formatting Disks is generally the "Sys:System/Format" command or "Format{FileSystemID}" tools.
And the various tools I have seen for SFS/PFS and other FileSystems usually live in C: or Sys:Utilities/

maybe "Sys:System/Format"+"Sys:System/Format{FSID}" as a standard policy?
User avatar
thomasrapp
Posts: 310
Joined: Sat Jun 18, 2011 11:22 pm

Re: Sys:System/Format command split...

Post by thomasrapp »

with minimal modification to the OS
It's not that easy. The assignment of a filesystem to a partition is determined by the DosType in the partition table. The partition table is read before AmigaDOS starts. When AmigaDOS starts it mounts all the partitions. That's long before the Format program can be run. Mounting a partition means running a task with the file system's code. Once this task runs the assignment of the file system to the partition is fixed and cannot be changed any more. When the Format command starts it is too late. All that the Format command does and can do is to send an "initialize yourself" command to the file system's task. It does not do any file system-specifig initialization itself.

A command line tool which can change the DosType and other attributes of a partition already exists: http://thomas-rapp.homepage.t-online.de ... ootpri.lha
To apply the changes you have to reboot the machine, though. This will always be the case, even if this functionality would be added to the Format tool. You cannot change file system + format in one step.

Note that file system-specific format tools do not change the file system of a partition. If you use PFSFormat on a SFS partition it will format the partition with SFS. It cannot do anything else.
These programs are not necessary actually. You can always use the standard Format tool to format a partition.
Belxjander
Posts: 314
Joined: Mon May 14, 2012 10:26 pm
Location: 日本千葉県松戸市 / Matsudo City, Chiba, Japan
Contact:

Re: Sys:System/Format command split...

Post by Belxjander »

Ahhhh.... always thought that the Format command performed FileSystem initialization for a given partition
Wasn't aware it actually handed that off to the FileSystem itself.

Then a modification would be sorting out some means of extended options for specific filesystems,
or some means of "setting a filesystem config" for when the formatting of a partition occurs.

As for the RigidDiskBlock specific settings, I wasn't touching on changing any of that directly with the format command at all.

more thinking given a partitions DOStype (as something Format can read from the DOSdriver) possibly handling extended arguments,
such as enabling Journalling (if optional) or Trashcan/.Recycled folder presence...

Those kinds of options. I know OFS has Trashcan=ON/OFF, FFS has Intl+DirCache options, SFS has .recycled, and there is a filesystem that allows logs to be fixed size (possibly options when creating the file??? which fs and how to set those is what I have forgotten)

I wasn't asking about setting the FileSystem in the RDB at all (the dostype already set is the default filesystem to format the partition as a given)

One thing I have done is setup an RDB partition with CrossDOS(FAT32 DOStype) but formatted it as SFS instead... (changed the dostype to correct it later)
User avatar
thomasrapp
Posts: 310
Joined: Sat Jun 18, 2011 11:22 pm

Re: Sys:System/Format command split...

Post by thomasrapp »

more thinking given a partitions DOStype (as something Format can read from the DOSdriver) possibly handling extended arguments,
such as enabling Journalling (if optional) or Trashcan/.Recycled folder presence...
Yes, I see what you mean. But putting all these options into the standard Format program would be quite some effort. Especially as file systems are made by third parties and features might change over time. Not to mention the legal implications if third-party software is interfaced.

To make it real generic the Format program would have to offer a kind of plugin system which can add custom options to the GUI and apply those settings to the partition after formatting. Then each file system vendor would have to supply such a plugin for his/her file system.

OFS has Trashcan=ON/OFF
Trashcan is a Workbench feature. It can be created on any file system. Even in Ram Disk.

there is a filesystem that allows logs to be fixed size
PFS3 supports what it calls Rollover files.
Post Reply