stand/uboot: Remove unneeded nitems definition
Also, remove the trailing white space that was introduced in the same commit as the nitems fallback definition. Sponsored by: Netflix
This commit is contained in:
+5
-9
@@ -35,10 +35,6 @@
|
||||
#include "glue.h"
|
||||
#include "libuboot.h"
|
||||
|
||||
#ifndef nitems
|
||||
#define nitems(x) (sizeof((x)) / sizeof((x)[0]))
|
||||
#endif
|
||||
|
||||
#ifndef HEAP_SIZE
|
||||
#define HEAP_SIZE (2 * 1024 * 1024)
|
||||
#endif
|
||||
@@ -50,7 +46,7 @@ int devs_no;
|
||||
uintptr_t uboot_heap_start;
|
||||
uintptr_t uboot_heap_end;
|
||||
|
||||
struct device_type {
|
||||
struct device_type {
|
||||
const char *name;
|
||||
int type;
|
||||
} device_types[] = {
|
||||
@@ -336,7 +332,7 @@ get_load_device(int *type, int *unit, int *slice, int *partition)
|
||||
*unit = -1;
|
||||
*slice = D_SLICEWILD;
|
||||
*partition = D_PARTWILD;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
print_disk_probe_info(void)
|
||||
@@ -365,7 +361,7 @@ print_disk_probe_info(void)
|
||||
}
|
||||
|
||||
static int
|
||||
probe_disks(int devidx, int load_type, int load_unit, int load_slice,
|
||||
probe_disks(int devidx, int load_type, int load_unit, int load_slice,
|
||||
int load_partition)
|
||||
{
|
||||
int open_result, unit;
|
||||
@@ -518,7 +514,7 @@ main(int argc, char **argv)
|
||||
|
||||
if ((load_type == DEV_TYP_NONE || (load_type & DEV_TYP_STOR)) &&
|
||||
strcmp(devsw[i]->dv_name, "disk") == 0) {
|
||||
if (probe_disks(i, load_type, load_unit, load_slice,
|
||||
if (probe_disks(i, load_type, load_unit, load_slice,
|
||||
load_partition) == 0)
|
||||
break;
|
||||
}
|
||||
@@ -634,7 +630,7 @@ handle_uboot_env_var(enum ubenv_action action, const char * var)
|
||||
* import the uboot variable ubname into the loader variable ldname,
|
||||
* otherwise the historical behavior is to import to uboot.ubname.
|
||||
*/
|
||||
if (action == UBENV_IMPORT) {
|
||||
if (action == UBENV_IMPORT) {
|
||||
len = strcspn(var, "=");
|
||||
if (len == 0) {
|
||||
printf("name cannot start with '=': '%s'\n", var);
|
||||
|
||||
Reference in New Issue
Block a user