Repository navigation
Conversation
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Handle EAGAIN from device reception src/dev/udev.c |
The code includes <errno.h> and checks errno after a NULL device result. It suppresses the error log for EAGAIN and still returns -1. |
Priority:
Estimated code review effort: 1 (Trivial) | ~3 minutes
Change: Bug fix
Suggested reviewers: rsmarples
Merge Risk: 
Minimal · up to 5ac80
-
The change only suppresses expected empty-queue logging and preserves existing handling, so it is mergeable.
Pre-merge checks: 
4 · 
1
-
Failed checks: 1 warning Passed checks: 4 passed -
Finishing Touches
-
🧪 Generate unit tests (beta)
-
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands.
| device = udev_monitor_receive_device(monitor); | ||
| if (device == NULL) { | ||
| if (errno == EAGAIN) | ||
| return 0; |
There was a problem hiding this comment.
Why return 0?
The dev manager currently doesn't do anything with the result, so all you are doing here is avoiding the logging.
I would prefer to return -1 still unless you have a good technical reason?
There was a problem hiding this comment.
I used 0 to distinguish an empty queue, but that distinction isn't needed here. I've kept -1 and only skip the log for EAGAIN.
There was a problem hiding this comment.
Ah, that's fair enough. I'm happy for it to return 0 if you like.
There was a problem hiding this comment.
Maybe add a comment to explain we are are ignoring EAGAIN.
There was a problem hiding this comment.
Added a short comment for the empty-queue case. I kept the original -1 return so the change only affects logging.
946da29 to
ad46b1e
Compare
Avoid logging an empty nonblocking udev queue (EAGAIN). Keep the existing -1 return for NULL devices and log other errors as before. Assisted-by: OpenAI Codex
ad46b1e to
5ac805e
Compare
Avoid logging an empty nonblocking udev queue (
EAGAIN). OtherNULLresults are still logged, and allNULLresults keep the existing-1return.I checked the empty-queue and error cases, normal device callbacks, and rebuilt the udev module.