Application that formats for FAT16 (ioctl)

I’m working on a mini, POSIX OS for an embedded system. I recently created a translation layer block driver for the internal DINOR flash memory only to find that the home-grown FS another guy had built can’t be used for partitions larger than can be held in memory (which would take us from 6MB down to 300KB or so…) so I need to get VFAT running in a hurry on the device.

Does anyone know of any bare-bones, open source application that just accepts a block device and uses basic ioctl read and write to format an empty partition? My Google skills are failing me today…

Nevermind, I found the code for mkdosfs and was able to port it over.