source: rtems/cpukit/libfs/src/rfs/rtems-rfs-format.h @ c499856

4.11
Last change on this file since c499856 was c499856, checked in by Chris Johns <chrisj@…>, on Mar 20, 2014 at 9:10:47 PM

Change all references of rtems.com to rtems.org.

  • Property mode set to 100644
File size: 1.6 KB
Line 
1/**
2 * @file
3 *
4 * @ingroup rtems_rfs
5 *
6 * @brief RTEMS File System Format
7 *
8 * This function lets you format a disk in the RFS format.
9 */
10
11/*
12 *  COPYRIGHT (c) 2010 Chris Johns <chrisj@rtems.org>
13 *
14 *  The license and distribution terms for this file may be
15 *  found in the file LICENSE in this distribution or at
16 *  http://www.rtems.org/license/LICENSE.
17 */
18
19#if !defined (_RTEMS_RFS_FORMAT_H_)
20#define _RTEMS_RFS_FORMAT_H_
21
22#include <stddef.h>
23#include <stdbool.h>
24#include <stdint.h>
25
26#ifdef __cplusplus
27extern "C" {
28#endif
29
30#include <rtems/rfs/rtems-rfs-trace.h>
31
32/**
33 * RFS File System Configuration data used to format the file system. For
34 * default values leave the field set to 0.
35 */
36typedef struct _rtems_rfs_format_config
37{
38  /**
39   * The size of a block.
40   */
41  size_t block_size;
42
43  /**
44   * The number of blocks in a group.
45   */
46  size_t group_blocks;
47
48  /**
49   * The number of inodes in a group.
50   */
51  size_t group_inodes;
52
53  /**
54   * The percentage overhead allocated to inodes.
55   */
56  int inode_overhead;
57
58  /**
59   * The maximum length of a name.
60   */
61  size_t max_name_length;
62
63  /**
64   * Initialise the inode tables to all ones.
65   */
66  bool initialise_inodes;
67
68  /**
69   * Is the format verbose.
70   */
71  bool verbose;
72
73} rtems_rfs_format_config;
74
75/**
76 * RFS Format command.
77 *
78 * @param[in] name is the device name to format.
79 * @param[in] config is a pointer to the configuration table.
80 *
81 * @retval -1 Error. See errno.
82 * @retval 0 No error. Format successful.
83 */
84int rtems_rfs_format (const char* name, const rtems_rfs_format_config* config);
85
86#ifdef __cplusplus
87}
88#endif
89
90#endif
Note: See TracBrowser for help on using the repository browser.