minix/servers/iso9660fs/misc.c
David van Moolenbroek af01bda509 libbdev: initial version
The "bdev" library provides basic primitives for file systems to talk
to block device drivers, hiding the details of the underlying protocol
and interaction model.

This version of libbdev is rather basic. It is planned to support the
following features in the long run:

 - asynchronous requests and replies;
 - recovery support for underlying block drivers;
 - retrying of failed I/O requests.

The commit also changes our block-based file systems (mfs, ext2, isofs)
to make use of libbdev.
2011-11-09 14:43:25 +01:00

32 lines
814 B
C

#include "inc.h"
#include <fcntl.h>
#include <minix/vfsif.h>
#include <minix/bdev.h>
/*===========================================================================*
* fs_sync *
*===========================================================================*/
PUBLIC int fs_sync()
{
/* Always mounted read only, so nothing to sync */
return(OK); /* sync() can't fail */
}
/*===========================================================================*
* fs_new_driver *
*===========================================================================*/
PUBLIC int fs_new_driver()
{
/* Set a new driver endpoint for this device. */
dev_t dev;
endpoint_t endpt;
dev = (dev_t) fs_m_in.REQ_DEV;
endpt = (endpoint_t) fs_m_in.REQ_DRIVER_E;
bdev_driver(dev, endpt);
return(OK);
}