123 udfinit,
124 VSW_HASPROTO|VSW_CANREMOUNT|VSW_STATS|VSW_CANLOFI,
125 &udfs_mntopts
126 };
127
128 static mntopts_t udfs_mntopts = {
129 0,
130 NULL
131 };
132
133 /*
134 * Module linkage information for the kernel.
135 */
136 extern struct mod_ops mod_fsops;
137
138 static struct modlfs modlfs = {
139 &mod_fsops, "filesystem for UDFS", &vfw
140 };
141
142 static struct modlinkage modlinkage = {
143 MODREV_1, (void *)&modlfs, NULL
144 };
145
146 int32_t udf_fstype = -1;
147
148 int
149 _init()
150 {
151 return (mod_install(&modlinkage));
152 }
153
154 int
155 _fini()
156 {
157 return (EBUSY);
158 }
159
160 int
161 _info(struct modinfo *modinfop)
162 {
163 return (mod_info(&modlinkage, modinfop));
1895 brelse(bp);
1896 continue;
1897 }
1898 bp->b_flags |= B_AGE | B_STALE;
1899 brelse(bp);
1900 *loc = avd_loc;
1901 return (bsize);
1902 }
1903 }
1904
1905 /*
1906 * Did not find AVD at all the locations
1907 */
1908 return (0);
1909 }
1910
1911 static int
1912 udfinit(int fstype, char *name)
1913 {
1914 static const fs_operation_def_t udf_vfsops_template[] = {
1915 VFSNAME_MOUNT, { .vfs_mount = udf_mount },
1916 VFSNAME_UNMOUNT, { .vfs_unmount = udf_unmount },
1917 VFSNAME_ROOT, { .vfs_root = udf_root },
1918 VFSNAME_STATVFS, { .vfs_statvfs = udf_statvfs },
1919 VFSNAME_SYNC, { .vfs_sync = udf_sync },
1920 VFSNAME_VGET, { .vfs_vget = udf_vget },
1921 VFSNAME_MOUNTROOT, { .vfs_mountroot = udf_mountroot },
1922 NULL, NULL
1923 };
1924 extern struct vnodeops *udf_vnodeops;
1925 extern const fs_operation_def_t udf_vnodeops_template[];
1926 int error;
1927
1928 ud_printf("udfinit\n");
1929
1930 error = vfs_setfsops(fstype, udf_vfsops_template, NULL);
1931 if (error != 0) {
1932 cmn_err(CE_WARN, "udfinit: bad vfs ops template");
1933 return (error);
1934 }
1935
1936 error = vn_make_ops(name, udf_vnodeops_template, &udf_vnodeops);
1937 if (error != 0) {
1938 (void) vfs_freevfsops_by_type(fstype);
1939 cmn_err(CE_WARN, "udfinit: bad vnode ops template");
1940 return (error);
1941 }
1942
|
123 udfinit,
124 VSW_HASPROTO|VSW_CANREMOUNT|VSW_STATS|VSW_CANLOFI,
125 &udfs_mntopts
126 };
127
128 static mntopts_t udfs_mntopts = {
129 0,
130 NULL
131 };
132
133 /*
134 * Module linkage information for the kernel.
135 */
136 extern struct mod_ops mod_fsops;
137
138 static struct modlfs modlfs = {
139 &mod_fsops, "filesystem for UDFS", &vfw
140 };
141
142 static struct modlinkage modlinkage = {
143 MODREV_1, { (void *)&modlfs, NULL }
144 };
145
146 int32_t udf_fstype = -1;
147
148 int
149 _init()
150 {
151 return (mod_install(&modlinkage));
152 }
153
154 int
155 _fini()
156 {
157 return (EBUSY);
158 }
159
160 int
161 _info(struct modinfo *modinfop)
162 {
163 return (mod_info(&modlinkage, modinfop));
1895 brelse(bp);
1896 continue;
1897 }
1898 bp->b_flags |= B_AGE | B_STALE;
1899 brelse(bp);
1900 *loc = avd_loc;
1901 return (bsize);
1902 }
1903 }
1904
1905 /*
1906 * Did not find AVD at all the locations
1907 */
1908 return (0);
1909 }
1910
1911 static int
1912 udfinit(int fstype, char *name)
1913 {
1914 static const fs_operation_def_t udf_vfsops_template[] = {
1915 { VFSNAME_MOUNT, { .vfs_mount = udf_mount } },
1916 { VFSNAME_UNMOUNT, { .vfs_unmount = udf_unmount } },
1917 { VFSNAME_ROOT, { .vfs_root = udf_root } },
1918 { VFSNAME_STATVFS, { .vfs_statvfs = udf_statvfs } },
1919 { VFSNAME_SYNC, { .vfs_sync = udf_sync } },
1920 { VFSNAME_VGET, { .vfs_vget = udf_vget } },
1921 { VFSNAME_MOUNTROOT, { .vfs_mountroot = udf_mountroot } },
1922 { NULL, { NULL } }
1923 };
1924 extern struct vnodeops *udf_vnodeops;
1925 extern const fs_operation_def_t udf_vnodeops_template[];
1926 int error;
1927
1928 ud_printf("udfinit\n");
1929
1930 error = vfs_setfsops(fstype, udf_vfsops_template, NULL);
1931 if (error != 0) {
1932 cmn_err(CE_WARN, "udfinit: bad vfs ops template");
1933 return (error);
1934 }
1935
1936 error = vn_make_ops(name, udf_vnodeops_template, &udf_vnodeops);
1937 if (error != 0) {
1938 (void) vfs_freevfsops_by_type(fstype);
1939 cmn_err(CE_WARN, "udfinit: bad vnode ops template");
1940 return (error);
1941 }
1942
|