| ||
TFS supports file attributes. Each attribute (or flag) simply describes the file to TFS. An attribute in the file header is simply a bit setting. At the command line, each attribute is identified by a single letter. The following is a list of all the file attributes, including a brief description of each:
Attribute | Abbreviation | Description |
---|---|---|
executable script | e | ASCII file executed as a script |
executable binary | E | binary file loaded and run based on format |
autoboot | b | file is executed at startup |
autoboot with query | B | file is executed at startup if user query passes |
compressed | c | file is compressed |
in-place-modifiable | I | file is in-place-modifiable |
unreadable | u | file cannot be read at lower user level |
user level | 0-3 | file can only be written at or above its user level |
Currently, the executable binary file formats supported are AOUT (old Unix file format), COFF (common object file format), and ELF (executable and linking format). New formats can easily be incorporated into TFS.
At some point in the startup process, MicroMonitor looks to TFS for autobootable files. MicroMonitor supports three types of autobootable files: two file types designated by the attributes assigned to the file and one special case (the monrc file). For the monrc file to run automatically, it must exist and have the e attribute (executable script) set. The monrc file runs prior to any other autobootable file in TFS and prior to MicroMonitor completing its own initialization. MicroMonitor can therefore configure itself using parameters established in the monrc executable. Remaining autobootable files are run after MicroMonitor has completed initialization. The files are run in alphabetical order, so the order in which they are placed in TFS doesnt matter. The order in which they are listed via the command tfs ls is the order in which they execute.
Name Size Location Flags bkgd.jpg 5976 0x80047a6c cardtilt.gif 6099 0x80040c1c boot_diag 109358 0x8004921c BE construction.gif 20222 0x8004243c form.html 466 0x8004004c my_app 792080 0x80155a7c BE index.html 442 0x8004026c info1.html 1053 0x8004047c info2.html 734 0x800408ec lucentlogo.gif 1680 0x8004738c monrc 823 0x80154d2c e
The order of autoboot execution for the files given in Listing 7.1 is:
monrc
boot_diag
my_app
All other files listed are data files used by the application. The two autobootable attributes supported are B and b , both of which run at startup. The B type queries the user at the console port, providing an opportunity to abort the autoboot of that file. If the query times out (about two seconds) before the user responds, the file executes. You can configure both scripts and binary executables with the autoboot attribute.
MicroMonitor supports the concept of user levels. One user level is considered active at any given time. TFS supports the ability to store a file at a particular user level then limit access to that file based on the user level at the time of the access. Individual files can be marked read-only or not-even-readable. Because each user level is attainable only via password, a system can be built at user level 3 and then lowered to user level 2, 1, or 0 to provide varying degrees of protection from unauthorized access.
| ||