Kay Sievers wrote:
On Thu, May 21, 2009 at 20:27, Alan Jenkins <alan-jenkins@xxxxxxxxxxxxxx> wrote:
Instead of creating a file for each event, append their details to a
log file. The file is periodically rebuilt (garbage-collected) to
prevent it from growing indefinitely.
Sounds cool. Boots fine here. :)
I've switched a few int to unsigned int, to silent some gcc warnings,
merged the few entries in queue-private.h just into libudev-private.h,
moved the file format comments to the C file, renamed the
seqnums_are_finished() to seqnum_sequence_is_finished() and exported
it, bumped the minor version of libudev, and comitted it.
Would be great, if you can check, that I didn't mess it up. :)
Thanks a lot,
Kay
Wow, thanks! I checked the delta. I don't see any problems in these
changes.
I only see one warning myself
lib/libudev-queue-export.c:143: warning: comparison between signed and
unsigned
142 n = seqnum - udev_queue_export->seqnum_max;
143 if (n >= devpaths->devpaths_size)
144 goto read_error;
Arguably it _might_ be better addressed in this one place, by casting
devpaths_size to unsigned. It seems to be a matter of personal taste
though, and I'm not complaining.
I have an unverifiable memory of reading "unsigned int i is evil" on
LKML. Half the internet says unsigned has relatively special semantics
(intended for e.g. bit manipulation), you should avoid it unless that's
what you actually need, and size_t should never have been defined as
unsigned. Of course, the other half advocate using unsigned liberally
to exclude negative values when passing array indexes around :-).
Alan
--
To unsubscribe from this list: send the line "unsubscribe linux-hotplug" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html