-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
network: also read mtime of drop-in configs #16030
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
network: also read mtime of drop-in configs #16030
Conversation
src/network/networkd-network.c
Outdated
|
|
||
| struct stat stats; | ||
| if (stat(filename, &stats) < 0) | ||
| return -errno; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In other places where we do stat for this purpose, we set the mtime to 0 on error. I think that's nice than propagating the error. We'll just maybe reload the config unnecessarily later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK. Updated.
334ce26 to
7e7e8bf
Compare
|
@keszybz Thank you for the review. I've updated the commits with your suggestions. PTAL. |
src/network/networkd-network.c
Outdated
| usec_t t; | ||
|
|
||
| if (stat(*f, &stats) < 0) | ||
| continue; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, that's not correct either. I think network->timestamp should be reset to 0 here and break.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see. Updated.
7e7e8bf to
9f83091
Compare
|
LGTM. |
Fixes #15521.