test-journal.c revision 3c1668da6202f1ead3d4d3981b89e9da1a0e98e3
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
/***
This file is part of systemd.
Copyright 2011 Lennart Poettering
under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version.
systemd is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
#include <fcntl.h>
#include <unistd.h>
#include <systemd/sd-journal.h>
#include "log.h"
#include "journal-file.h"
#include "journal-authenticate.h"
#include "journal-vacuum.h"
JournalFile *f;
Object *o;
uint64_t p;
char t[] = "/tmp/journal-XXXXXX";
assert_se(journal_file_open("test.journal", O_RDWR|O_CREAT, 0666, true, true, NULL, NULL, NULL, &f) == 0);
#ifdef HAVE_GCRYPT
#endif
journal_file_rotate(&f, true, true);
journal_file_rotate(&f, true, true);
log_error("Exiting...");
assert_se(rm_rf_dangerous(t, false, true, false) >= 0);
return 0;
}