mkfs - make a file system on a device
#include <sys/types.h>
#include <fsys.h>
mkfs() makes a file system on the device specified by devnum using the server servername. disksize is specified in bytes and the number of total files is specified by nfiles. devnum refers to the entry in the device number table in the upper 8 bits with a minor device number specified in the lower 8 bits. mkfs is processed by the main fsys thread and other threads may not have access to the device when the file system is being made. All files must be closed and synchronized.
Upon successful completion, zero is returned. If an error has occurred, the return value is -1 and errno is set.
This function is a member of Unison's IOLIB family of functions. IOLIB is implemented as a message passing and generalized interface layer. Each Unison I/O server is responsible for its own error reporting.
For an exact list of error codes returned by a particular server, refer to that server's documentation in the Unison Programmer's Guide for each specific platform.
Servers may implement these errors codes in response to this function.
mkfs() fails and the errno is set as follows: