Merge pull request #13365 from keszybz/fix-commits-from-pr-13246

Fix commits from #13246
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2019-08-22 09:13:25 +02:00 committed by GitHub
commit d0696f3b75
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 11 additions and 7 deletions

View File

@ -129,7 +129,7 @@
#define _PCRE2_FEATURE_ "-PCRE2"
#endif
#define _CGROUP_HIEARCHY_ "default-hierarchy=" DEFAULT_HIERARCHY_NAME
#define _CGROUP_HIERARCHY_ "default-hierarchy=" DEFAULT_HIERARCHY_NAME
#define SYSTEMD_FEATURES \
_PAM_FEATURE_ " " \
@ -153,4 +153,4 @@
_IDN2_FEATURE_ " " \
_IDN_FEATURE_ " " \
_PCRE2_FEATURE_ " " \
_CGROUP_HIEARCHY_
_CGROUP_HIERARCHY_

View File

@ -101,6 +101,7 @@ static int parse_argv(int argc, char *argv[]) {
static const struct option options[] = {
{ "help", no_argument, NULL, 'h' },
{ "version", no_argument, NULL, ARG_VERSION },
{ "pretty", no_argument, NULL, 'p' },
{ "app-specific", required_argument, NULL, 'a' },
{},
};

View File

@ -42,13 +42,16 @@ int main(int argc, char *argv[]) {
assert_se(f && f->current_offset > 0);
r = journal_file_move_to_object(f, OBJECT_ENTRY, f->current_offset, &o);
if (r < 0)
log_error_errno(r, "journal_file_move_to_object failed: %m");
assert_se(r >= 0);
r = journal_file_copy_entry(f, new_journal, o, f->current_offset);
if (r < 0)
log_error_errno(r, "journal_file_copy_entry failed: %m");
assert_se(r >= 0);
n++;
if (n > 10000)
if (++n >= 10000)
break;
}

View File

@ -395,7 +395,7 @@ static int inotify_handler(sd_event_source *s, const struct inotify_event *ev, v
} else if (ev->mask & IN_CREATE) {
unsigned i;
log_info("inotify-handler <%s>: create on %s", description, ev->name);
log_debug("inotify-handler <%s>: create on %s", description, ev->name);
if (!streq(ev->name, "sub")) {
assert_se(safe_atou(ev->name, &i) >= 0);
@ -483,7 +483,7 @@ static void test_inotify(unsigned n_create_events) {
}
int main(int argc, char *argv[]) {
test_setup_logging(LOG_DEBUG);
test_setup_logging(LOG_INFO);
test_basic();
test_sd_event_now();

View File

@ -341,7 +341,7 @@ static void test_is_wanted_print(bool header) {
log_info("cmdline: %s", cmdline);
if (header) {
log_info(_CGROUP_HIEARCHY_);
log_info(_CGROUP_HIERARCHY_);
(void) system("findmnt -n /sys/fs/cgroup");
}