[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 1/4] 9pfs: V9fsQID: set type of version and path
From: |
Greg Kurz |
Subject: |
Re: [Qemu-devel] [PATCH 1/4] 9pfs: V9fsQID: set type of version and path to unsigned |
Date: |
Fri, 9 Feb 2018 13:37:10 +0100 |
On Thu, 8 Feb 2018 19:00:16 +0100
<address@hidden> wrote:
> From: Antonios Motakis <address@hidden>
>
> There is no need for signedness on these QID fields for 9p.
>
> Signed-off-by: Antonios Motakis <address@hidden>
> ---
I agree these should be unsigned, but you have some more places to adapt
to this change. At least these:
- related traces in hw/9pfs/trace-events should then expect unsigned values
- donttouch_stat() in hw/9pfs/9p.c should stop comparing them to -1
> fsdev/9p-marshal.h | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/fsdev/9p-marshal.h b/fsdev/9p-marshal.h
> index c8823d8..d1ad364 100644
> --- a/fsdev/9p-marshal.h
> +++ b/fsdev/9p-marshal.h
> @@ -10,8 +10,8 @@ typedef struct V9fsString
> typedef struct V9fsQID
> {
> int8_t type;
Even if your series doesn't use it, while here, let's drop the sign from
@type as well.
> - int32_t version;
> - int64_t path;
> + uint32_t version;
> + uint64_t path;
> } V9fsQID;
>
> typedef struct V9fsStat