[Devel] Re: [patch 1/4][resend] fuse-procfs: proxy proc files

Serge E. Hallyn serue at us.ibm.com
Thu Sep 10 19:57:07 PDT 2009


Quoting Daniel Lezcano (daniel.lezcano at free.fr):
> This patch makes possible to mount the fuse-procfs on top of /proc
> and display the content of /proc via fuse.
> 
> Signed-off-by: Daniel Lezcano <daniel.lezcano at free.fr>

Thanks, Daniel.  This is neat.  How were you thinking of
configuring this?  A config file read at mount?

Actually one question I have is:

> +static int procfs_read(const char *path, char *buf, size_t size,
> +		      off_t offset, struct fuse_file_info *fi)
> +{
> +	int ret;
> +	struct procfs_file *pfile = (typeof(pfile))fi->fh;;
> +
> +	switch (pfile->type) {
> +
> +	case PROCFS_PROXY:
> +		ret = read(pfile->file.proxy.fd, buf, size);

Are you supposed to do something with the offset?  I don't see
any seek method in fuse_operations, does fuse keep the fp
internally and send it along as offset to read?

> +		if (ret < 0)
> +			return -errno;
> +		break;
> +	}
> +
> +	return ret;
> +}

-serge
_______________________________________________
Containers mailing list
Containers at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers




More information about the Devel mailing list