a4bcff5ba36115495994e9f9ba66074471de76abLennart Poettering This file is part of systemd.
a4bcff5ba36115495994e9f9ba66074471de76abLennart Poettering Copyright 2012 Lennart Poettering
a4bcff5ba36115495994e9f9ba66074471de76abLennart Poettering systemd is free software; you can redistribute it and/or modify it
a4bcff5ba36115495994e9f9ba66074471de76abLennart Poettering under the terms of the GNU Lesser General Public License as published by
a4bcff5ba36115495994e9f9ba66074471de76abLennart Poettering the Free Software Foundation; either version 2.1 of the License, or
a4bcff5ba36115495994e9f9ba66074471de76abLennart Poettering (at your option) any later version.
a4bcff5ba36115495994e9f9ba66074471de76abLennart Poettering systemd is distributed in the hope that it will be useful, but
a4bcff5ba36115495994e9f9ba66074471de76abLennart Poettering WITHOUT ANY WARRANTY; without even the implied warranty of
a4bcff5ba36115495994e9f9ba66074471de76abLennart Poettering MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
a4bcff5ba36115495994e9f9ba66074471de76abLennart Poettering Lesser General Public License for more details.
a4bcff5ba36115495994e9f9ba66074471de76abLennart Poettering You should have received a copy of the GNU Lesser General Public License
a4bcff5ba36115495994e9f9ba66074471de76abLennart Poettering along with systemd; If not, see <http://www.gnu.org/licenses/>.
a4bcff5ba36115495994e9f9ba66074471de76abLennart Poettering unsigned n = 0;
4afd3348c7506dd1d36305b7bcb9feb8952b9d6bLennart Poettering _cleanup_(sd_journal_closep) sd_journal*j = NULL;
a4bcff5ba36115495994e9f9ba66074471de76abLennart Poettering assert_se(sd_journal_open(&j, SD_JOURNAL_LOCAL_ONLY) >= 0);
a4bcff5ba36115495994e9f9ba66074471de76abLennart Poettering assert_se(sd_journal_add_match(j, "_TRANSPORT=syslog", 0) >= 0);
a4bcff5ba36115495994e9f9ba66074471de76abLennart Poettering assert_se(sd_journal_add_match(j, "_UID=0", 0) >= 0);
a4bcff5ba36115495994e9f9ba66074471de76abLennart Poettering const void *d;
a4bcff5ba36115495994e9f9ba66074471de76abLennart Poettering assert_se(sd_journal_get_data(j, "MESSAGE", &d, &l) >= 0);