RTEMS Logo

RTEMS 4.10.2 On-Line Library


File and Directory Commands mkrfs - format RFS file system

PREV UP NEXT Bookshelf RTEMS Shell User's Guide

3.2.22: mkrfs - format RFS file system

SYNOPSYS:

mkrfs [-vsbiIo] device

DESCRIPTION:

Format the block device with the RTEMS File System (RFS). The default configuration with not parameters selects a suitable block size based on the size of the media being formatted.

The media is broken up into groups of blocks. The number of blocks in a group is based on the number of bits a block contains. The large a block the more blocks a group contains and the fewer groups in the file system.

The following options are provided:

-v
Display configuration and progress of the format.
-s
Set the block size in bytes.
-b
The number of blocks in a group. The block count must be equal or less than the number of bits in a block.
-i
Number of inodes in a group. The inode count must be equal or less than the number of bits in a block.
-I
Initialise the inodes. The default is not to initialise the inodes and to rely on the inode being initialised when allocated. Initialising the inode table helps recovery if a problem appears.
-o
Integer percentage of the media used by inodes. The default is 1%.
device
Path of the device to format.

EXIT STATUS:

This command returns 0 on success and non-zero if an error is encountered.

NOTES:

NONE

EXAMPLES:

The following is an example of how to use mkrfs:

SHLL [/] $ mkrfs /dev/fdda

CONFIGURATION:

This command is included in the default shell command set. When building a custom command set, define CONFIGURE_SHELL_COMMAND_MKRFS to have this command included.

This command can be excluded from the shell command set by defining CONFIGURE_SHELL_NO_COMMAND_MKRFS when all shell commands have been configured.

PROGRAMMING INFORMATION:

The mkrfs command is implemented by a C language function which has the following prototype:

int rtems_shell_rtems_main_mkrfs(
  int    argc,
  char **argv
);

The configuration structure for mkrfs has the following prototype:

extern rtems_shell_cmd_t rtems_shell_MKRFS_Command;


PREV UP NEXT Bookshelf RTEMS Shell User's Guide

Copyright © 1988-2008 OAR Corporation