test-boot-timestamps.c revision cf0fbc49e67b55f8d346fc94de28c90113505297
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
/***
This file is part of systemd.
Copyright 2013 Lennart Poettering
Copyright 2013 Kay Sievers
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 "acpi-fpdt.h"
#include "boot-timestamps.h"
#include "efivars.h"
#include "log.h"
#include "util.h"
static int test_acpi_fpdt(void) {
char ts_start[FORMAT_TIMESPAN_MAX];
char ts_exit[FORMAT_TIMESPAN_MAX];
char ts_span[FORMAT_TIMESPAN_MAX];
int r;
if (r < 0) {
if (r != -ENOENT)
log_error_errno(r, "Failed to read ACPI FPDT: %m");
return r;
}
log_info("ACPI FPDT: loader start=%s exit=%s duration=%s",
return 0;
}
static int test_efi_loader(void) {
char ts_start[FORMAT_TIMESPAN_MAX];
char ts_exit[FORMAT_TIMESPAN_MAX];
char ts_span[FORMAT_TIMESPAN_MAX];
int r;
if (r < 0) {
if (r != -ENOENT)
log_error_errno(r, "Failed to read EFI loader data: %m");
return r;
}
log_info("EFI Loader: start=%s exit=%s duration=%s",
return 0;
}
int r;
dual_timestamp fw, l, k;
dual_timestamp_from_monotonic(&k, 0);
if (r < 0) {
log_error_errno(r, "Failed to read variables: %m");
return 1;
}
return 0;
}