3 #include <minix/vfsif.h>
4 #include <minix/bdev.h>
7 /*===========================================================================*
9 *===========================================================================*/
12 /* Always mounted read only, so nothing to sync */
13 return(OK
); /* sync() can't fail */
17 /*===========================================================================*
19 *===========================================================================*/
20 int fs_new_driver(void)
22 /* Set a new driver endpoint for this device. */
24 cp_grant_id_t label_gid
;
26 char label
[sizeof(fs_dev_label
)];
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
))
36 r
= sys_safecopyfrom(fs_m_in
.m_source
, label_gid
, (vir_bytes
) 0,
37 (vir_bytes
) label
, label_len
);
40 printf("ISOFS: fs_new_driver safecopyfrom failed (%d)\n", r
);
44 bdev_driver(dev
, label
);