Diff

Differences From Artifact [0c5019ef32]:

To Artifact [190e7becb3]:


341
342
343
344
345
346
347

348
349
350

351
352
353
354
355
356
357
...
401
402
403
404
405
406
407




408





409
410
411






412
413
414
415
416
417
418
	if (_path[1] == '\0') {
		/* Request for the root directory */
		pathinfo->type = APPFS_PATHTYPE_DIRECTORY;
		sites = appfs_getsites(&sites_count);
		pathinfo->typeinfo.dir.childcount = sites_count;

		if (children) {

			for (site = sites; site; site = site->_next) {
				node = (void *) ckalloc(sizeof(*node));
				node->_next = *children;

				*children = node;
			}
		}

		appfs_free_list_site(sites);

		return(0);
................................................................................
		stbuf->st_size = pathinfo.typeinfo.file.size;
	}

	return res;
}

static int appfs_fuse_readdir(const char *path, void *buf, fuse_fill_dir_t filler, off_t offset, struct fuse_file_info *fi) {




	APPFS_DEBUG("Enter (path = %s, ...)", path);






	filler(buf, ".", NULL, 0);
	filler(buf, "..", NULL, 0);







	return 0;
}

static int appfs_fuse_open(const char *path, struct fuse_file_info *fi) {
	return(-ENOENT);
}







>



>







 







>
>
>
>

>
>
>
>
>



>
>
>
>
>
>







341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
...
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
	if (_path[1] == '\0') {
		/* Request for the root directory */
		pathinfo->type = APPFS_PATHTYPE_DIRECTORY;
		sites = appfs_getsites(&sites_count);
		pathinfo->typeinfo.dir.childcount = sites_count;

		if (children) {
			*children = NULL;
			for (site = sites; site; site = site->_next) {
				node = (void *) ckalloc(sizeof(*node));
				node->_next = *children;
				strcpy(node->name, site->name);
				*children = node;
			}
		}

		appfs_free_list_site(sites);

		return(0);
................................................................................
		stbuf->st_size = pathinfo.typeinfo.file.size;
	}

	return res;
}

static int appfs_fuse_readdir(const char *path, void *buf, fuse_fill_dir_t filler, off_t offset, struct fuse_file_info *fi) {
	struct appfs_pathinfo pathinfo;
	struct appfs_children *children, *child;
	int res;

	APPFS_DEBUG("Enter (path = %s, ...)", path);

	res = appfs_get_path_info(path, &pathinfo, &children);
	if (res != 0) {
		return(res);
	}

	filler(buf, ".", NULL, 0);
	filler(buf, "..", NULL, 0);

	for (child = children; child; child = child->_next) {
		filler(buf, child->name, NULL, 0);
	}

	appfs_free_list_children(children);

	return 0;
}

static int appfs_fuse_open(const char *path, struct fuse_file_info *fi) {
	return(-ENOENT);
}