View on GitHub

Fosfat: library and FUSE extension

Smaky FOS on GNU/Linux & Window$

Download this project as a .zip file Download this project as a tar.gz file

Introduction

Fosfat is a library written in C for accessing in read-only to an Smaky formatted disk (compatible hard disk and floppy disk). A tool and a FUSE extension are available for reading a Smaky FOS disk. For Window$, some features are not supported, like the images conversions and the FUSE extension.

FosBlup copyright Mathieu Schroeter, 2007

It is a free software - it is licensed under the terms of the GNU General Public License (GNU/GPL) version 3.

Copyright and License

Fosfat is copyright (C) 2006-2010,2023 Mathieu Schroeter.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Requirements

The following programs are required to build fosfat for GNU/Linux:

Building and Installation for GNU/Linux

Compile libfosfat, libfosgra, fosdd, fosread, fosrec, fosmount and smascii by running:

./configure
make

This should produce four executables fosdd, fosread, fosrec and smascii (in ./tools/), fosmount (in ./fosmount/) and two libraries libfosfat.a/.so (in ./libfosfat/) and libfosgra.a/.so (in ./libfosgra/). No extra files need to be installed. You can change some options for configure, look ./configure --help for more informations.

If you want to install Fosfat on your system, run:

make install

The binaries are copied into their appropriate directories (/usr/local/bin and /usr/local/lib), and the header into /usr/local/include in this example. Change the --prefix for an other target directory.

Building for Window$ 9x/NT

Compile libfosfat, fosdd, fosread, fosrec and smascii by running:

# 32 bit
./configure --cross-compile --cross-prefix=i686-w64-mingw32-
# 64 bit
./configure --cross-compile --cross-prefix=x86_64-w64-mingw32-
make

This should produce four executables fosdd, fosread, fosrec and smascii (in ./tools/), and three libraries libfosfat-0.dll (in ./libfosfat/), libw32disk-0.dll (in ./libw32disk/) and libfosgra-0.dll (in ./libfosgra/). No extra files need to be installed. You can change some options for configure, look in the ./configure --help script for more informations.

Usage

You can found a doxygen documentation of the library link.

Fosmount (only GNU/Linux)

The fosmount tool uses FUSE to mount the FOS in your tree.

Usage: fosmount [options] device mountpoint

-h --help             this help
-v --version          version
-a --harddisk         force an hard disk (default autodetect)
-f --floppydisk       force a floppy disk (default autodetect)
-l --fos-logger       that will turn on the FOS logger
-d --fuse-debugger    that will turn on the FUSE debugger
-i --image-pbm        convert on the fly .IMAGE to .PBM
-j --image-xpm        convert on the fly .COLOR to .XPM (ver. 2)

device                /dev/fd0 : floppy disk
                      /dev/sda : hard disk, etc
mountpoint            for example, /mnt/smaky

Example:

Fosread (GNU/Linux & Window$)

The fosread tool can be used only from the console. It can be used with two modes. One to list all files in a directory, and the second to copy a file in a local directory.

Usage: fosread [options] device mode [node] [path]

-h --help             this help
-v --version          version
-a --harddisk         force an hard disk (default autodetect)
-f --floppydisk       force a floppy disk (default autodetect)
-l --fos-logger       that will turn on the FOS logger
-u --undelete         enable the undelete mode, even deleted files will
                      be listed and sometimes restorable with 'get' mode.

device                /dev/fd0 : floppy disk
                      /dev/sda : hard disk, etc
mode
  list                list the content of a node
  get                 copy a file from the Smaky's disk in a local directory
node                  the tree with the file (or folder) for 'get' or 'list'
                      example: foo/bar/toto.text
path                  you can specify a path for save the file (with get mode)

Examples GNU/Linux:

Examples Window$:

fosdd (GNU/Linux & Window$)

The fosdd tool can be used only from the console. Use this tool to convert floppy image to disk image and vice-versa.

Usage: fosdd [options] device destination

-h --help             this help
-v --version          version
-f --force            overwrite the destination if exists
-l --fos-logger       that will turn on the FOS logger

Examples GNU/Linux:

Examples Window$:

Fosrec (GNU/Linux & Window$)

The fosrec tool can be used only from the console. This tool can retrieve the deleted files.

Usage: fosrec [options] device destination

-h --help             this help
-v --version          version
-a --harddisk         force an hard disk (default autodetect)
-f --floppydisk       force a floppy disk (default autodetect)
-l --fos-logger       that will turn on the FOS logger

Examples GNU/Linux:

Examples Window$:

Smascii

The smascii tool can be used to convert Smaky text file to Extended ASCII (ISO-8859-1).

Usage: smascii smaky_file converted_file [--unix]

smaky_file            the smaky text file
converted_file        the file converted
--unix                the Carriage Return (Old Mac) will be
                      converted to Line Feed (unix)

Example:

Download

The last release (1.0.0), is available to https://github.com/Skywalker13/Fosfat/releases/tag/v1.0.0

Feedback

The author of fosfat and this document, Mathieu Schroeter, can be contacted by e-mail.

Please send bug reports, suggestions, ideas, comments or patches to : mathieu@schroetersa.ch

Links

Thanks

Many thanks to Pierre Arnaud for his help and the FOS's documentation and to GitHub for the hosting!