Lines Matching refs:dirent

168                                struct xenhypfs_dirent *dirent)  in xenhypfs_set_attrs()  argument
170 dirent->size = entry->content_len; in xenhypfs_set_attrs()
174 dirent->type = xenhypfs_type_dir; in xenhypfs_set_attrs()
177 dirent->type = xenhypfs_type_blob; in xenhypfs_set_attrs()
180 dirent->type = xenhypfs_type_string; in xenhypfs_set_attrs()
183 dirent->type = xenhypfs_type_uint; in xenhypfs_set_attrs()
186 dirent->type = xenhypfs_type_int; in xenhypfs_set_attrs()
189 dirent->type = xenhypfs_type_bool; in xenhypfs_set_attrs()
192 dirent->type = xenhypfs_type_blob; in xenhypfs_set_attrs()
197 dirent->encoding = xenhypfs_enc_plain; in xenhypfs_set_attrs()
200 dirent->encoding = xenhypfs_enc_gzip; in xenhypfs_set_attrs()
203 dirent->encoding = xenhypfs_enc_plain; in xenhypfs_set_attrs()
204 dirent->type = xenhypfs_type_blob; in xenhypfs_set_attrs()
207 dirent->flags = entry->max_write_len ? XENHYPFS_FLAG_WRITABLE : 0; in xenhypfs_set_attrs()
211 struct xenhypfs_dirent **dirent) in xenhypfs_read_raw() argument
220 *dirent = NULL; in xenhypfs_read_raw()
261 *dirent = calloc(1, sizeof(struct xenhypfs_dirent) + strlen(name) + 1); in xenhypfs_read_raw()
262 if (!*dirent) { in xenhypfs_read_raw()
268 (*dirent)->name = (char *)(*dirent + 1); in xenhypfs_read_raw()
269 strcpy((*dirent)->name, name); in xenhypfs_read_raw()
270 xenhypfs_set_attrs(entry, *dirent); in xenhypfs_read_raw()
284 struct xenhypfs_dirent *dirent; in xenhypfs_read() local
287 buf = xenhypfs_read_raw(fshdl, path, &dirent); in xenhypfs_read()
291 switch (dirent->encoding) { in xenhypfs_read()
295 ret_buf = xenhypfs_inflate(buf, &dirent->size); in xenhypfs_read()
304 switch (dirent->type) { in xenhypfs_read()
317 switch (dirent->size) { in xenhypfs_read()
338 switch (dirent->size) { in xenhypfs_read()
363 free(dirent); in xenhypfs_read()
376 struct xenhypfs_dirent *ret_buf = NULL, *dirent; in xenhypfs_readdir() local
380 buf = xenhypfs_read_raw(fshdl, path, &dirent); in xenhypfs_readdir()
384 if (dirent->type != xenhypfs_type_dir || in xenhypfs_readdir()
385 dirent->encoding != xenhypfs_enc_plain) { in xenhypfs_readdir()
390 if (dirent->size) { in xenhypfs_readdir()
421 free(dirent); in xenhypfs_readdir()