WIP: fix post-switch-root file operations#63
Conversation
Share the first part of the Cisco patch authored by Oleksiy Obitotskyy to fix reading from /proc/schedstat post-switch-root (see systemd#60). More changes are needed since writing the svg file fails.
|
@sofar : this is WIP, but please share any comments you might have. There is some code duplication. |
src/store.c
Outdated
| if (fd < 0) | ||
| return log_error_errno(errno, "Failed to openat /proc/<>: %m"); | ||
|
|
||
| if (fstatat(procfd, fn, &st, 0) < 0) |
There was a problem hiding this comment.
Just use fstat(fd, ... here.
There was a problem hiding this comment.
done. that is simpler.
|
Please change the patch title to something other than "WIP 1". Looks okay in general, just some small remarks from me. |
I will create a better commit message after I finish the next part (i.e. fixing the writing of the svg file). This is still a draft PR. |
|
Just put WIP in the title of the PR. Nothing wrong with iterative development imho. Once you're ready for merging, I would squash together your commits into coherent changesets. |
Share the first part of the Cisco patch authored by Oleksiy Obitotskyy to fix reading from
/proc/schedstatpost-switch-root (see #60).More changes are needed since writing the svg file fails.