mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-16 03:25:25 +02:00
util/nvmutil: merge nvmalloc with readGbe
it's so simply now, all it does is set the gbe pointers Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
@@ -15,7 +15,7 @@
|
|||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
void cmd_setchecksum(void), cmd_brick(void), swap(int partnum), writeGbe(void),
|
void cmd_setchecksum(void), cmd_brick(void), swap(int partnum), writeGbe(void),
|
||||||
cmd_dump(void), cmd_setmac(void), nvmalloc(void), readGbe(void),
|
cmd_dump(void), cmd_setmac(void), readGbe(void),
|
||||||
checkdir(const char *path), macf(int partnum), hexdump(int partnum),
|
checkdir(const char *path), macf(int partnum), hexdump(int partnum),
|
||||||
parseMacString(const char *strMac, uint16_t *mac), cmd_swap(void),
|
parseMacString(const char *strMac, uint16_t *mac), cmd_swap(void),
|
||||||
openFiles(void), cmd_copy(void), writeGbe_part(int),
|
openFiles(void), cmd_copy(void), writeGbe_part(int),
|
||||||
@@ -91,7 +91,6 @@ main(int argc, char *argv[])
|
|||||||
#ifdef __OpenBSD__
|
#ifdef __OpenBSD__
|
||||||
err_if(pledge("stdio", NULL) == -1);
|
err_if(pledge("stdio", NULL) == -1);
|
||||||
#endif
|
#endif
|
||||||
nvmalloc();
|
|
||||||
readGbe();
|
readGbe();
|
||||||
(*cmd)();
|
(*cmd)();
|
||||||
writeGbe();
|
writeGbe();
|
||||||
@@ -186,15 +185,11 @@ xopen(int *f, const char *l, int p, struct stat *st)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
nvmalloc(void)
|
readGbe(void)
|
||||||
{
|
{
|
||||||
gbe[0] = buf;
|
gbe[0] = buf;
|
||||||
gbe[1] = buf + SIZE_4KB;
|
gbe[1] = buf + SIZE_4KB;
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
readGbe(void)
|
|
||||||
{
|
|
||||||
for (int p = 0; p < 2; p++)
|
for (int p = 0; p < 2; p++)
|
||||||
readGbe_part(p);
|
readGbe_part(p);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user