From: Bandan Das <bsd@redhat.com>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v3 3/4] usb-mtp: Add support for inotify based file monitoring
Date: Tue, 17 Nov 2015 18:48:11 -0500 [thread overview]
Message-ID: <jpgk2pgchms.fsf@linux.bootlegged.copy> (raw)
In-Reply-To: <1447761819.23726.74.camel@redhat.com> (Gerd Hoffmann's message of "Tue, 17 Nov 2015 13:03:39 +0100")
Gerd Hoffmann <kraxel@redhat.com> writes:
> 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.
Isn't the SAFE variant better for the case where a inotify delete event occurs
when we are getting the object handles ?
>> + 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 ...
Agreed, I will rewrite this part.
> cheers,
> Gerd
next prev parent reply other threads:[~2015-11-17 23:48 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-17 0:06 [Qemu-devel] [PATCH v3 0/4] usb-mtp events support Bandan Das
2015-11-17 0:06 ` [Qemu-devel] [PATCH v3 1/4] usb-mtp: use a list for keeping track of children Bandan Das
2015-11-17 11:54 ` Gerd Hoffmann
2015-11-17 0:06 ` [Qemu-devel] [PATCH v3 2/4] usb-mtp: free objects on a mtp reset Bandan Das
2015-11-17 0:06 ` [Qemu-devel] [PATCH v3 3/4] usb-mtp: Add support for inotify based file monitoring Bandan Das
2015-11-17 12:03 ` Gerd Hoffmann
2015-11-17 23:48 ` Bandan Das [this message]
2015-11-18 6:55 ` Gerd Hoffmann
2015-11-17 0:06 ` [Qemu-devel] [PATCH v3 4/4] usb-mtp: add support for basic mtp events Bandan Das
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jpgk2pgchms.fsf@linux.bootlegged.copy \
--to=bsd@redhat.com \
--cc=kraxel@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).