boot-efi.c revision 7b4d7cc08283e5485dcfa49ffdf1915de1d5e81b
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
/***
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 <stdlib.h>
#include <stdbool.h>
#include <unistd.h>
#include <getopt.h>
#include <locale.h>
#include <string.h>
#include <fnmatch.h>
#include <fcntl.h>
#include "boot.h"
#include "boot-loader.h"
#include "build.h"
#include "util.h"
#include "strv.h"
#include "efivars.h"
#include "conf-files.h"
int err = 0;
if (!d)
return -errno;
unsigned int id;
struct boot_info_entry *e;
continue;
continue;
if (!e) {
break;
}
info->fw_entries = e;
memset(e, 0, sizeof(struct boot_info_entry));
e->order = -1;
if (err < 0)
break;
info->fw_entries_count++;
}
closedir(d);
return err;
}
void *buf;
size_t l;
size_t i;
if (err < 0)
return err;
for (i = 0; i < info->fw_entries_count; i++) {
continue;
info->fw_entry_active = i;
err = 0;
break;
}
return err;
}
size_t i, k;
int err;
if (err < 0)
return err;
for (i = 0; i < info->fw_entries_order_count; i++) {
for (k = 0; k < info->fw_entries_count; k++) {
continue;
break;
}
}
return 0;
}
static int entry_cmp(const void *a, const void *b) {
const struct boot_info_entry *e1 = a;
const struct boot_info_entry *e2 = b;
/* boot order of active entries */
/* sort active entries before inactive ones */
return 1;
return -1;
/* order of inactive entries */
}
char str[64];
char buf[64];
char *loader_active;
if (info->fw_entries_count > 0) {
}
if (loader_active) {
}
return 0;
}