Lines Matching refs:fsopts
57 chfs_prep_opts(fsinfo_t *fsopts)
75 fsopts->size = 0;
76 fsopts->fs_specific = chfs_opts;
77 fsopts->fs_options = copy_opts(chfs_options);
81 chfs_cleanup_opts(fsinfo_t *fsopts)
83 free(fsopts->fs_specific);
84 free(fsopts->fs_options);
88 chfs_parse_opts(const char *option, fsinfo_t *fsopts)
92 assert(fsopts != NULL);
94 return set_option(fsopts->fs_options, option, NULL, 0) != -1;
98 chfs_makefs(const char *image, const char *dir, fsnode *root, fsinfo_t *fsopts)
105 assert(fsopts != NULL);
108 chfs_validate(dir, root, fsopts);
113 if (chfs_create_image(image, fsopts) == -1) {
118 fsopts->curinode = CHFS_ROOTINO;
123 write_eb_header(fsopts);
124 if (!chfs_populate_dir(dir, root, root, fsopts)) {
129 padblock(fsopts);
131 if (close(fsopts->fd) == -1) {
134 fsopts->fd = -1;
140 chfs_validate(const char* dir, fsnode *root, fsinfo_t *fsopts)
145 assert(fsopts != NULL);
147 chfs_opts = fsopts->fs_specific;
161 chfs_create_image(const char *image, fsinfo_t *fsopts)
164 assert(fsopts != NULL);
166 if ((fsopts->fd = open(image, O_RDWR | O_CREAT | O_TRUNC, 0666)) == -1) {
171 return fsopts->fd;
176 fsinfo_t *fsopts)
183 assert(fsopts != NULL);
189 fsopts->curinode++;
190 cur->inode->ino = fsopts->curinode;
200 write_vnode(fsopts, cur);
201 write_dirent(fsopts, cur);
203 write_file(fsopts, cur, dir);
215 if (!chfs_populate_dir(path, cur->child, cur, fsopts)) {