minix/servers/iso9660fs/misc.c
Ben Gras 2bfeeed885 drop segment from safecopy invocations
. all invocations were S or D, so can safely be dropped
	  to prepare for the segmentless world
	. still assign D to the SCP_SEG field in the message
	  to make previous kernels usable
2012-06-16 16:22:51 +00:00

47 lines
1.2 KiB
C

#include "inc.h"
#include <fcntl.h>
#include <minix/vfsif.h>
#include <minix/bdev.h>
/*===========================================================================*
* fs_sync *
*===========================================================================*/
int fs_sync()
{
/* Always mounted read only, so nothing to sync */
return(OK); /* sync() can't fail */
}
/*===========================================================================*
* fs_new_driver *
*===========================================================================*/
int fs_new_driver(void)
{
/* Set a new driver endpoint for this device. */
dev_t dev;
cp_grant_id_t label_gid;
size_t label_len;
char label[sizeof(fs_dev_label)];
int r;
dev = (dev_t) fs_m_in.REQ_DEV;
label_gid = (cp_grant_id_t) fs_m_in.REQ_GRANT;
label_len = (size_t) fs_m_in.REQ_PATH_LEN;
if (label_len > sizeof(label))
return(EINVAL);
r = sys_safecopyfrom(fs_m_in.m_source, label_gid, (vir_bytes) 0,
(vir_bytes) label, label_len);
if (r != OK) {
printf("ISOFS: fs_new_driver safecopyfrom failed (%d)\n", r);
return(EINVAL);
}
bdev_driver(dev, label);
return(OK);
}