/*-
* Copyright (c) 1998 Robert Nordier
* All rights reserved.
* Copyright (c) 2001 Robert Drehmel
* All rights reserved.
* Copyright (c) 2014 Nathan Whitehorn
* All rights reserved.
* Copyright (c) 2015 Eric McCorkle
* All rights reverved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $FreeBSD$
*/
#include <stdarg.h>
#include <stdbool.h>
#include <efi.h>
#include "boot_module.h"
static int
{
int size;
if (status != EFI_SUCCESS) {
DPRINTF("dskread: failed dev: %p, id: %u, lba: %lu, size: %d, "
return (-1);
}
return (0);
}
#include "ufsread.c"
static int
{
}
static EFI_STATUS
{
return (EFI_UNSUPPORTED);
return (EFI_SUCCESS);
}
static EFI_STATUS
{
void *buf;
DPRINTF("Failed to init device\n");
return (EFI_UNSUPPORTED);
}
return (EFI_NOT_FOUND);
}
return (EFI_INVALID_PARAMETER);
}
EFI_SUCCESS) {
printf("Failed to allocate read buffer %zu for '%s' (%lu)\n",
return (status);
}
size);
return (EFI_INVALID_PARAMETER);
}
DPRINTF("Load complete\n");
return (EFI_SUCCESS);
}
static void
status()
{
int i;
;
switch (i) {
case 0:
printf("no partitions\n");
break;
case 1:
printf("%d partition\n", i);
break;
default:
printf("%d partitions\n", i);
}
}
static dev_info_t *
_devices()
{
return (devices);
}
{
.name = "UFS",
};