/***
This file is part of systemd.
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 <errno.h>
#include <fcntl.h>
#include <stddef.h>
#include <stdint.h>
#include <string.h>
#include <unistd.h>
#include "acpi-fpdt.h"
#include "alloc-util.h"
#include "fd-util.h"
#include "fileio.h"
#include "time-util.h"
struct acpi_table_header {
};
enum {
ACPI_FPDT_TYPE_BOOT = 0,
};
struct acpi_fpdt_header {
};
struct acpi_fpdt_boot_header {
};
enum {
};
struct acpi_fpdt_boot {
};
size_t l = 0;
int r;
if (r < 0)
return r;
if (l < sizeof(struct acpi_table_header) + sizeof(struct acpi_fpdt_header))
return -EINVAL;
return -EINVAL;
return -EINVAL;
/* find Firmware Basic Boot Performance Pointer Record */
break;
continue;
continue;
break;
}
if (ptr == 0)
return -EINVAL;
/* read Firmware Basic Boot Performance Data Record */
if (fd < 0)
return -errno;
if (l != sizeof(struct acpi_fpdt_boot_header))
return -EINVAL;
return -EINVAL;
return -EINVAL;
if (l != sizeof(struct acpi_fpdt_boot))
return -EINVAL;
return -EINVAL;
return -EINVAL;
return -EINVAL;
return -EINVAL;
if (loader_start)
if (loader_exit)
return 0;
}