qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [V2 10/25] hw/9pfs: Update v9fs_readdir to use coroutin


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [V2 10/25] hw/9pfs: Update v9fs_readdir to use coroutines
Date: Wed, 18 May 2011 11:10:32 +0100

On Tue, May 17, 2011 at 8:43 PM, Venkateswararao Jujjuri (JV)
<address@hidden> wrote:
> -/* Size of each dirent on the wire: size of qid (13) + size of offset (8)
> +/*
> + * Size of each dirent on the wire: size of qid (13) + size of offset (8)
>  * size of type (1) + size of name.size (2) + strlen(name.data)
>  */
> -#define V9_READDIR_DATA_SZ (24 + strlen(vs->name.data))
> +#define V9_READDIR_DATA_SZ (24 + strlen(name.data))

This should look like a function, not like a constant:
static size_t v9fs_readdir_data_size(V9fsString *name)
{
    /*
     * Size of each dirent on the wire: size of qid (13) + size of offset (8)
     * size of type (1) + size of name.size (2) + strlen(name.data)
     */
    return 24 + v9fs_string_size(name);
}

Stefan



reply via email to

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