Print this page
7127  remove -Wno-missing-braces from Makefile.uts


 142  * Debugging purposes.
 143  */
 144 int do_schedio = 1;
 145 static int hsfsfstype;
 146 static int hsfsinit(int, char *);
 147 
 148 static vfsdef_t vfw = {
 149         VFSDEF_VERSION,
 150         "hsfs",
 151         hsfsinit,
 152         /* We don't suppport remounting */
 153         VSW_HASPROTO|VSW_STATS|VSW_CANLOFI,
 154         &hsfs_proto_opttbl
 155 };
 156 
 157 static struct modlfs modlfs = {
 158         &mod_fsops, "filesystem for HSFS", &vfw
 159 };
 160 
 161 static struct modlinkage modlinkage = {
 162         MODREV_1, (void *)&modlfs, NULL
 163 };
 164 
 165 extern void hsched_init_caches(void);
 166 extern void hsched_fini_caches(void);
 167 
 168 
 169 int
 170 _init(void)
 171 {
 172         return (mod_install(&modlinkage));
 173 }
 174 
 175 int
 176 _fini(void)
 177 {
 178         int     error;
 179 
 180         error = mod_remove(&modlinkage);
 181 
 182         DTRACE_PROBE1(mod_remove, int, error);


 233 static int hs_findhsvol(struct hsfs *fsp, struct vnode *vp,
 234         struct hs_volume *hvp);
 235 static int hs_parsehsvol(struct hsfs *fsp, uchar_t *volp,
 236         struct hs_volume *hvp);
 237 static int hs_findisovol(struct hsfs *fsp, struct vnode *vp,
 238         struct hs_volume *hvp,
 239         struct hs_volume *svp,
 240         struct hs_volume *jvp);
 241 static int hs_joliet_level(uchar_t *volp);
 242 static int hs_parseisovol(struct hsfs *fsp, uchar_t *volp,
 243         struct hs_volume *hvp);
 244 static void hs_copylabel(struct hs_volume *, unsigned char *, int);
 245 static int hs_getmdev(struct vfs *, char *fspec, int flags, dev_t *pdev,
 246         mode_t *mode, cred_t *cr);
 247 static int hs_findvoldesc(dev_t rdev, int desc_sec);
 248 
 249 static int
 250 hsfsinit(int fstype, char *name)
 251 {
 252         static const fs_operation_def_t hsfs_vfsops_template[] = {
 253                 VFSNAME_MOUNT,          { .vfs_mount = hsfs_mount },
 254                 VFSNAME_UNMOUNT,        { .vfs_unmount = hsfs_unmount },
 255                 VFSNAME_ROOT,           { .vfs_root = hsfs_root },
 256                 VFSNAME_STATVFS,        { .vfs_statvfs = hsfs_statvfs },
 257                 VFSNAME_VGET,           { .vfs_vget = hsfs_vget },
 258                 VFSNAME_MOUNTROOT,      { .vfs_mountroot = hsfs_mountroot },
 259                 NULL,                   NULL
 260         };
 261         int error;
 262 
 263         error = vfs_setfsops(fstype, hsfs_vfsops_template, NULL);
 264         if (error != 0) {
 265                 cmn_err(CE_WARN, "hsfsinit: bad vfs ops template");
 266                 return (error);
 267         }
 268 
 269         error = vn_make_ops(name, hsfs_vnodeops_template, &hsfs_vnodeops);
 270         if (error != 0) {
 271                 (void) vfs_freevfsops_by_type(fstype);
 272                 cmn_err(CE_WARN, "hsfsinit: bad vnode ops template");
 273                 return (error);
 274         }
 275 
 276         hsfsfstype = fstype;
 277         mutex_init(&hs_mounttab_lock, NULL, MUTEX_DEFAULT, NULL);
 278         hs_init_hsnode_cache();
 279         hsched_init_caches();




 142  * Debugging purposes.
 143  */
 144 int do_schedio = 1;
 145 static int hsfsfstype;
 146 static int hsfsinit(int, char *);
 147 
 148 static vfsdef_t vfw = {
 149         VFSDEF_VERSION,
 150         "hsfs",
 151         hsfsinit,
 152         /* We don't suppport remounting */
 153         VSW_HASPROTO|VSW_STATS|VSW_CANLOFI,
 154         &hsfs_proto_opttbl
 155 };
 156 
 157 static struct modlfs modlfs = {
 158         &mod_fsops, "filesystem for HSFS", &vfw
 159 };
 160 
 161 static struct modlinkage modlinkage = {
 162         MODREV_1, { (void *)&modlfs, NULL }
 163 };
 164 
 165 extern void hsched_init_caches(void);
 166 extern void hsched_fini_caches(void);
 167 
 168 
 169 int
 170 _init(void)
 171 {
 172         return (mod_install(&modlinkage));
 173 }
 174 
 175 int
 176 _fini(void)
 177 {
 178         int     error;
 179 
 180         error = mod_remove(&modlinkage);
 181 
 182         DTRACE_PROBE1(mod_remove, int, error);


 233 static int hs_findhsvol(struct hsfs *fsp, struct vnode *vp,
 234         struct hs_volume *hvp);
 235 static int hs_parsehsvol(struct hsfs *fsp, uchar_t *volp,
 236         struct hs_volume *hvp);
 237 static int hs_findisovol(struct hsfs *fsp, struct vnode *vp,
 238         struct hs_volume *hvp,
 239         struct hs_volume *svp,
 240         struct hs_volume *jvp);
 241 static int hs_joliet_level(uchar_t *volp);
 242 static int hs_parseisovol(struct hsfs *fsp, uchar_t *volp,
 243         struct hs_volume *hvp);
 244 static void hs_copylabel(struct hs_volume *, unsigned char *, int);
 245 static int hs_getmdev(struct vfs *, char *fspec, int flags, dev_t *pdev,
 246         mode_t *mode, cred_t *cr);
 247 static int hs_findvoldesc(dev_t rdev, int desc_sec);
 248 
 249 static int
 250 hsfsinit(int fstype, char *name)
 251 {
 252         static const fs_operation_def_t hsfs_vfsops_template[] = {
 253                 { VFSNAME_MOUNT,        { .vfs_mount = hsfs_mount } },
 254                 { VFSNAME_UNMOUNT,      { .vfs_unmount = hsfs_unmount } },
 255                 { VFSNAME_ROOT,         { .vfs_root = hsfs_root } },
 256                 { VFSNAME_STATVFS,      { .vfs_statvfs = hsfs_statvfs } },
 257                 { VFSNAME_VGET,         { .vfs_vget = hsfs_vget } },
 258                 { VFSNAME_MOUNTROOT,    { .vfs_mountroot = hsfs_mountroot } },
 259                 { NULL,                 { NULL } }
 260         };
 261         int error;
 262 
 263         error = vfs_setfsops(fstype, hsfs_vfsops_template, NULL);
 264         if (error != 0) {
 265                 cmn_err(CE_WARN, "hsfsinit: bad vfs ops template");
 266                 return (error);
 267         }
 268 
 269         error = vn_make_ops(name, hsfs_vnodeops_template, &hsfs_vnodeops);
 270         if (error != 0) {
 271                 (void) vfs_freevfsops_by_type(fstype);
 272                 cmn_err(CE_WARN, "hsfsinit: bad vnode ops template");
 273                 return (error);
 274         }
 275 
 276         hsfsfstype = fstype;
 277         mutex_init(&hs_mounttab_lock, NULL, MUTEX_DEFAULT, NULL);
 278         hs_init_hsnode_cache();
 279         hsched_init_caches();