Example #1
0
static void
state_quotafile(
	FILE		*fp,
	uint		type,
	char		*dir,
	uint		flags)
{
	fs_cursor_t	cursor;
	fs_path_t	*mount;

	fs_cursor_initialise(dir, FS_MOUNT_POINT, &cursor);
	while ((mount = fs_cursor_next_entry(&cursor)))
		state_quotafile_mount(fp, type, mount, flags);
}
Example #2
0
/*
 * Given a directory, match it up to a filesystem mount point.
 */
static struct fs_path *
fs_mount_point_from_path(
	const char	*dir)
{
	fs_cursor_t	cursor;
	fs_path_t	*fs;
	dev_t		dev = 0;

	if (fs_device_number(dir, &dev))
		return NULL;

	fs_cursor_initialise(NULL, FS_MOUNT_POINT, &cursor);
	while ((fs = fs_cursor_next_entry(&cursor))) {
		if (fs->fs_datadev == dev)
			break;
	}
	return fs;
}
Example #3
0
static void
project(
	char		*project,
	int		type)
{
	fs_cursor_t     cursor;
	fs_path_t	*path;
	int		count = 0;

	fs_cursor_initialise(NULL, FS_PROJECT_PATH, &cursor);
	while ((path = fs_cursor_next_entry(&cursor))) {
		if (prid != path->fs_prid && path->fs_prid != -1)
			continue;
		project_operations(project, path->fs_dir, type);
		count++;
	}

	printf(_("Processed %d (%s and cmdline) paths for project %s with "
		"recursion depth %s (%d).\n"),
		 count, projects_file, project,
		 recurse_depth < 0 ? _("infinite") : _("limited"), recurse_depth);
}