qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 3/4] include/sysemu/blockdev.h: move drive_add and inline dri


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH 3/4] include/sysemu/blockdev.h: move drive_add and inline drive_def
Date: Wed, 24 Nov 2021 08:38:09 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.3.0

On 11/24/21 07:36, Emanuele Giuseppe Esposito wrote:
> drive_add is only used in softmmu/vl.c, so it can be a static
> function there, and drive_def is only a particular use case of
> qemu_opts_parse_noisily, so it can be inlined.
> 
> Also remove drive_mark_claimed_by_board, as it is only defined
> but not implemented (nor used) anywhere.
> 
> Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
> ---
>  include/sysemu/blockdev.h      |  6 ++----
>  block/monitor/block-hmp-cmds.c |  2 +-
>  blockdev.c                     | 27 +--------------------------
>  softmmu/vl.c                   | 25 ++++++++++++++++++++++++-
>  4 files changed, 28 insertions(+), 32 deletions(-)
> 
> diff --git a/include/sysemu/blockdev.h b/include/sysemu/blockdev.h
> index 32c2d6023c..aacc587a33 100644
> --- a/include/sysemu/blockdev.h
> +++ b/include/sysemu/blockdev.h
> @@ -27,6 +27,8 @@ typedef enum {
>      IF_COUNT
>  } BlockInterfaceType;
>  
> +extern const char *const block_if_name[];

Maybe a cleaner alternative is to ignore the previous patch,
and add a new public method:

  const char *block_if_name(BlockInterfaceType iface);




reply via email to

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