]> git.ipfire.org Git - thirdparty/systemd.git/commit
journalctl-filter: several cleanups for add_matches() 31964/head
authorYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 21 Mar 2024 19:19:42 +0000 (04:19 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 26 Mar 2024 14:51:47 +0000 (23:51 +0900)
commit96a7f3fc75c4ba39129b5205911e8b1dca53f197
tree729a6d12091017d419bbb885c1f6ee58db5fc109
parentbb59f34c210b58471a4b3794fd63bb1373f80511
journalctl-filter: several cleanups for add_matches()

- split it into small pieces to reduce indentation,
- return earlier if no filter specified,
- use journal_add_matchf() and journal_add_match_pair(),
  chase_and_stat(), is_symlink(), and sd_device_new_from_devname(),
- replace sd_device_get_devname() + stat() with sd_device_get_devnum(),
- refuse to install filter by path with --root, --image, or --machine
  at least now, as previously it has not worked anyway.
src/journal/journalctl-filter.c