aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorDaniel P. Berrangé <berrange@redhat.com>2018-06-11 17:41:59 +0100
committerDaniel P. Berrangé <berrange@redhat.com>2019-02-26 15:25:58 +0000
commit3c48baf1d43ca0f9a74f5a9e5286fde81da97021 (patch)
tree42092dbf2eebe8da72ea4e3611fc5a7a8ac7eccf /hw
parent6134d7522e570a30d7f0d1e092ee37351c5183ed (diff)
downloadqemu-3c48baf1d43ca0f9a74f5a9e5286fde81da97021.zip
qemu-3c48baf1d43ca0f9a74f5a9e5286fde81da97021.tar.gz
qemu-3c48baf1d43ca0f9a74f5a9e5286fde81da97021.tar.bz2
hw/usb: don't set IN_ISDIR for inotify watch in MTP driver
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. Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/usb/dev-mtp.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/hw/usb/dev-mtp.c b/hw/usb/dev-mtp.c
index f1d20fa..f0c52a4 100644
--- a/hw/usb/dev-mtp.c
+++ b/hw/usb/dev-mtp.c
@@ -653,8 +653,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);
}