qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v5 03/11] hw/usb: don't set IN_ISDIR for inotify


From: Philippe Mathieu-Daudé
Subject: Re: [Qemu-devel] [PATCH v5 03/11] hw/usb: don't set IN_ISDIR for inotify watch in MTP driver
Date: Wed, 10 Oct 2018 19:00:00 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.0

On 09/10/2018 15:04, Daniel P. Berrangé wrote:
> IN_ISDIR is not a bit that one can request when registering a
> watch with inotify_add_watch. Rather it is a bit that is set
> automatically when reading events from the kernel.
> 
> Signed-off-by: Daniel P. Berrangé <address@hidden>

Reviewed-by: Philippe Mathieu-Daudé <address@hidden>

> ---
>  hw/usb/dev-mtp.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/hw/usb/dev-mtp.c b/hw/usb/dev-mtp.c
> index 00a3691bae..f026419e47 100644
> --- a/hw/usb/dev-mtp.c
> +++ b/hw/usb/dev-mtp.c
> @@ -642,8 +642,7 @@ static void usb_mtp_inotify_cleanup(MTPState *s)
>  
>  static int usb_mtp_add_watch(int inotifyfd, char *path)
>  {
> -    uint32_t mask = IN_CREATE | IN_DELETE | IN_MODIFY |
> -        IN_ISDIR;
> +    uint32_t mask = IN_CREATE | IN_DELETE | IN_MODIFY;
>  
>      return inotify_add_watch(inotifyfd, path, mask);
>  }
> 



reply via email to

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