Skip to content

Conversation

@yuwata
Copy link
Member

@yuwata yuwata commented Jun 1, 2020

Fixes #15521.


struct stat stats;
if (stat(filename, &stats) < 0)
return -errno;
Copy link
Member

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.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK. Updated.

@yuwata yuwata force-pushed the network-read-mtime-of-dropin-configs-15521 branch 2 times, most recently from 334ce26 to 7e7e8bf Compare June 1, 2020 07:21
@yuwata
Copy link
Member Author

yuwata commented Jun 1, 2020

@keszybz Thank you for the review. I've updated the commits with your suggestions. PTAL.

usec_t t;

if (stat(*f, &stats) < 0)
continue;
Copy link
Member

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.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see. Updated.

@yuwata yuwata force-pushed the network-read-mtime-of-dropin-configs-15521 branch from 7e7e8bf to 9f83091 Compare June 1, 2020 08:03
@keszybz
Copy link
Member

keszybz commented Jun 1, 2020

LGTM.

@keszybz keszybz merged commit d06661a into systemd:master Jun 1, 2020
@yuwata yuwata deleted the network-read-mtime-of-dropin-configs-15521 branch June 2, 2020 01:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

networkctl reload doesn't reload drop-in files unless the main file has a changed mtime

2 participants