qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v3 3/4] usb-mtp: Add support for inotify based f


From: Gerd Hoffmann
Subject: Re: [Qemu-devel] [PATCH v3 3/4] usb-mtp: Add support for inotify based file monitoring
Date: Tue, 17 Nov 2015 13:03:39 +0100

  Hi,

> +#ifndef __linux__
> +    return 1;
> +#endif

Hmm?  Shouldn't the stubs avoid these kinds of #ifdefs?

> -    QLIST_FOREACH(iter, &o->children, list) {
> +    QLIST_FOREACH_SAFE(iter, &o->children, list, next) {
>          handles[i++] = iter->handle;
>      }

No need for SAFE here, you don't change the list.

> +        if (usb_mtp_inotify_init(s)) {
> +            fprintf(stderr, "usb-mtp: file monitoring init failed\n");
> +        }

I guess we want a function/macro here for linux/non-linux, then report
errors on linux only.  Reporting inotify failures on systems which don't
support inotify in the first place is just noise ...

cheers,
  Gerd





reply via email to

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