This patch makes Limine advertise its branding and the ESP partition GUID to systemd over the Boot Loader Interface specification. There's more to the Boot Loader Interface than these variables, but this acts as an initial implementation. See #473. BLI variables are initialised for all protocols, not just Linux. While currently only systemd makes use of it, this allows future Limine protocol kernels (or their userspace) to discover the ESP.
21 lines
462 B
C
21 lines
462 B
C
#ifndef LIB__GUID_H__
|
|
#define LIB__GUID_H__
|
|
|
|
#include <stdint.h>
|
|
#include <stdbool.h>
|
|
|
|
struct guid {
|
|
uint32_t a;
|
|
uint16_t b;
|
|
uint16_t c;
|
|
uint8_t d[8];
|
|
};
|
|
|
|
bool is_valid_guid(const char *s);
|
|
bool string_to_guid_be(struct guid *guid, const char *s);
|
|
bool string_to_guid_mixed(struct guid *guid, const char *s);
|
|
// Assumption: s must be big enough to fit 36 characters and a null byte
|
|
void guid_to_string(const struct guid *guid, char *s);
|
|
|
|
#endif
|