qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [V4 PATCH 6/8] Support for creating special files


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [V4 PATCH 6/8] Support for creating special files
Date: Tue, 1 Feb 2011 14:29:39 +0000

On Tue, Feb 1, 2011 at 5:27 AM, M. Mohan Kumar <address@hidden> wrote:
> +static int passthrough_mknod(FsContext *fs_ctx, const char *path, FsCred 
> *credp)
> +{
> +    V9fsFileObjectRequest request;
> +    int retval, error = 0;
> +
> +    fill_request(&request, path, credp);
> +    request.data.type = T_MKNOD;
> +
> +    retval = v9fs_create_special(fs_ctx, &request, &error);
> +    if (retval < 0) {
> +        errno = error;
> +    }
> +    return retval;
> +}

It would be nice to avoid duplicating all these wrappers.  Would it be
possible to write one generic function which takes the request type
and some optional arguments and runs the request?

Stefan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]