whefs  whefs-tools

whefs tools

The source tree comes with several tools for working with whefs filesystems:

  • whefs-mkfs creates EFS container files.
  • whefs-ls lists the contents of a EFS container.
  • whefs-cp imports files into or exports them from an EFS.
  • whefs-rm deletes files from a EFS.
  • whefs-addblocks adds blocks to an existing EFS.
  • whefs2c converts a whefs VFS to C code and creates a statically-linked in-memory VFS for it.

Most of those tools rely on private API routines which most client code won't have access to. Over time the public API will be fleshed out, such that client-side tools have the level of access they would need to implement features like those these tools provide.

Common command arguments

Most of the whefs tools support the following common arguments:

  • -? or --help = Show app help and quit.
  • -v or --verbose= Enable verbose mode
  • -V or --version = Show version information and quit.
  • -D or --debug-flags = Set to a string value describing the whefs debug categories which should be used. See below for more detail.

Most of these tools also require that an EFS file be given as the first non-flag argument on the command line. "Non-flag" means an argument which does not start with '-' or '--'.

Debugging flags

If whefs is built in debug mode (i.e. with the optional debuggering information turned on), the apps can use the -D or --debug-flags parameter to set send certain debugging messages. The arguments are used like -Dabc or --debug-flags=abc, where abc is one or more of the following letters (case-sensitive), each of which turns on a specific category of message:

  • 'a' = All messages.
  • 'c' = Caching messages.
  • 'd' = Default log level.
  • 'e' = Error messages.
  • 'f' = FIXME messages.
  • 'h' = Hacker-level messages (turns on several other options).
  • 'l' = Locking messages.
  • 'n' = NYI (Not Yet Implemented) messages.
  • 'w' = Warning messages.

If whefs was built without debugging information then the debug flags are ignored.