mineswefi.git

file.c

espurr
/* mineswefi - uefi minesweeper
 * Copyright (C) 2025 ArcNyxx <olive@arcnyxx.net>
 * see LICENCE file for licensing information */

#include "efi.h"

extern efi_handle_t loader;
extern efi_table_t *table;

static efi_image_t *info;
static efi_file_system_t *fs;
static efi_file_t *root;


void
fs_init(void)
{
	efi_guid_t guid = EFI_IMAGE_GUID;
	table->boot->open_proto(loader, &guid, &info, loader, NULL,
			EFI_OPEN_PROTO_HANDLE);
	guid = EFI_FILE_SYSTEM_GUID;
	table->boot->open_proto(info->device, &guid, &fs, loader, NULL,
			EFI_OPEN_PROTO_HANDLE);
	fs->open(fs, &root);
}

uint64_t
fs_open(const uint16_t *path, )
{
	root->open(root, 
}