* when running as user instance: implicitly default to WorkingDirectory=$HOME for all services.
-* journalctl highlight reboots
-
* Merge KillUnit()'s mode and who params into one
* load-fragment: when loading a unit file via a chain of symlinks
<listitem><para>Takes an absolute
directory path as argument. If
- specified will opearte on the
+ specified will operate on the
specified journal directory instead of
the default runtime and system journal
paths.</para></listitem>
sd_journal *j = NULL;
unsigned line = 0;
bool need_seek = false;
+ sd_id128_t previous_boot_id;
+ bool previous_boot_id_valid = false;
log_parse_environment();
log_open();
for (;;) {
for (;;) {
+ sd_id128_t boot_id;
+
if (need_seek) {
r = sd_journal_next(j);
if (r < 0) {
if (r == 0)
break;
+ r = sd_journal_get_monotonic_usec(j, NULL, &boot_id);
+ if (r >= 0) {
+ if (previous_boot_id_valid &&
+ !sd_id128_equal(boot_id, previous_boot_id))
+ printf(ANSI_HIGHLIGHT_ON "----- Reboot -----" ANSI_HIGHLIGHT_OFF "\n");
+
+ previous_boot_id = boot_id;
+ previous_boot_id_valid = true;
+ }
+
line ++;
r = output_journal(j, arg_output, line, 0, arg_show_all);