test41: relax maximum timer tick rate
[minix.git] / servers / iso9660fs / misc.c
blob7c7c9eb914a1f7e5d260e730d2dc5e84160db0f6
1 #include "inc.h"
2 #include <fcntl.h>
3 #include <minix/vfsif.h>
4 #include <minix/bdev.h>
7 /*===========================================================================*
8 * fs_sync *
9 *===========================================================================*/
10 int fs_sync()
12 /* Always mounted read only, so nothing to sync */
13 return(OK); /* sync() can't fail */
17 /*===========================================================================*
18 * fs_new_driver *
19 *===========================================================================*/
20 int fs_new_driver(void)
22 /* Set a new driver endpoint for this device. */
23 dev_t dev;
24 cp_grant_id_t label_gid;
25 size_t label_len;
26 char label[sizeof(fs_dev_label)];
27 int r;
29 dev = (dev_t) fs_m_in.REQ_DEV;
30 label_gid = (cp_grant_id_t) fs_m_in.REQ_GRANT;
31 label_len = (size_t) fs_m_in.REQ_PATH_LEN;
33 if (label_len > sizeof(label))
34 return(EINVAL);
36 r = sys_safecopyfrom(fs_m_in.m_source, label_gid, (vir_bytes) 0,
37 (vir_bytes) label, label_len);
39 if (r != OK) {
40 printf("ISOFS: fs_new_driver safecopyfrom failed (%d)\n", r);
41 return(EINVAL);
44 bdev_driver(dev, label);
46 return(OK);