Add nbdkit-floppy-plugin, “inspired” by qemu's VVFAT driver, but
without the ability to handle writes.
The implementation is pretty complete, supporting FAT32, LFNs, volume
labels, timestamps, etc, and it passes both ‘make check’ and ‘make
check-valgrind’.
Usage is simple; to serve the current directory:
$ nbdkit floppy .
Then using guestfish (or any NBD client):
$ guestfish --ro --format=raw -a nbd://localhost -m /dev/sda1
Welcome to guestfish, the guest filesystem shell for
editing virtual machine filesystems and disk images.
Type: ‘help’ for help on commands
‘man’ to read the manual
‘quit’ to quit the shell
<fs> ll /
total 2420
drwxr-xr-x 14 root root 16384 Jan 1 1970 .
drwxr-xr-x 19 root root 4096 Oct 28 10:07 ..
-rwxr-xr-x 1 root root 40 Sep 17 21:23 .dir-locals.el
-rwxr-xr-x 1 root root 879 Oct 27 21:10 .gdb_history
drwxr-xr-x 8 root root 16384 Oct 28 10:05 .git
-rwxr-xr-x 1 root root 1383 Sep 17 21:23 .gitignore
-rwxr-xr-x 1 root root 1453 Sep 17 21:23 LICENSE
-rwxr-xr-x 1 root root 34182 Oct 28 10:04 Makefile
-rwxr-xr-x 1 root root 2568 Oct 27 22:17 Makefile.am
-rwxr-xr-x 1 root root 32085 Oct 27 22:18 Makefile.in
-rwxr-xr-x 1 root root 620 Sep 17 21:23 OTHER_PLUGINS
-rwxr-xr-x 1 root root 4628 Oct 16 22:36 README
-rwxr-xr-x 1 root root 4007 Sep 17 21:23 TODO
-rwxr-xr-x 1 root root 54733 Oct 27 22:18 aclocal.m4
drwxr-xr-x 2 root root 16384 Oct 27 22:18 autom4te.cache
drwxr-xr-x 2 root root 16384 Oct 28 10:04 bash
drwxr-xr-x 5 root root 16384 Oct 27 18:07 common
[etc]
<fs> ll /plugins/floppy/
total 560
drwxr-xr-x 4 root root 16384 Oct 28 10:04 .
drwxr-xr-x 34 root root 16384 Oct 28 10:04 ..
drwxr-xr-x 2 root root 16384 Oct 28 10:04 .deps
drwxr-xr-x 2 root root 16384 Oct 28 10:04 .libs
-rwxr-xr-x 1 root root 34238 Oct 28 10:04 Makefile
-rwxr-xr-x 1 root root 2347 Oct 27 22:17 Makefile.am
-rwxr-xr-x 1 root root 33158 Oct 27 22:18 Makefile.in
-rwxr-xr-x 1 root root 18181 Oct 28 09:36 directory-lfn.c
-rwxr-xr-x 1 root root 5003 Oct 27 22:17 floppy.c
-rwxr-xr-x 1 root root 6724 Oct 28 10:04 nbdkit-floppy-plugin.1
-rwxr-xr-x 1 root root 996 Oct 28 10:04 nbdkit-floppy-plugin.la
-rwxr-xr-x 1 root root 2547 Oct 27 22:17 nbdkit-floppy-plugin.pod
-rwxr-xr-x 1 root root 363 Oct 28 10:04 nbdkit_floppy_plugin_la-directory-lfn.lo
-rwxr-xr-x 1 root root 90096 Oct 28 10:04 nbdkit_floppy_plugin_la-directory-lfn.o
-rwxr-xr-x 1 root root 342 Oct 28 10:04 nbdkit_floppy_plugin_la-floppy.lo
-rwxr-xr-x 1 root root 31720 Oct 28 10:04 nbdkit_floppy_plugin_la-floppy.o
-rwxr-xr-x 1 root root 366 Oct 28 10:04 nbdkit_floppy_plugin_la-virtual-floppy.lo
-rwxr-xr-x 1 root root 57320 Oct 28 10:04 nbdkit_floppy_plugin_la-virtual-floppy.o
-rwxr-xr-x 1 root root 24514 Oct 28 09:56 virtual-floppy.c
-rwxr-xr-x 1 root root 9184 Oct 28 09:33 virtual-floppy.h
Rich.