summaryrefslogtreecommitdiff
path: root/util/libreboot-utils
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2026-03-29 08:37:32 +0100
committerLeah Rowe <leah@libreboot.org>2026-03-29 08:37:32 +0100
commit45edcf33f7d4b2f405c0f59fccc71b6ac15f5c65 (patch)
tree8265896bd03c180d40e08549ad69f7eaf7ff4c7e /util/libreboot-utils
parent6e4839d3566bbabd30d0d15b4edb820d4d4b042f (diff)
lbutils: rename mkrbuf to rmalloc
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'util/libreboot-utils')
-rw-r--r--util/libreboot-utils/include/common.h4
-rw-r--r--util/libreboot-utils/lib/rand.c8
-rw-r--r--util/libreboot-utils/lottery.c2
3 files changed, 7 insertions, 7 deletions
diff --git a/util/libreboot-utils/include/common.h b/util/libreboot-utils/include/common.h
index abd153be..b5b251d3 100644
--- a/util/libreboot-utils/include/common.h
+++ b/util/libreboot-utils/include/common.h
@@ -396,9 +396,9 @@ int dcat(const char *s, size_t n,
unsigned short hextonum(char ch_s);
void spew_hex(const void *data, size_t len);
-void *mkrbuf(size_t n);
+void *rmalloc(size_t n);
void rset(void *buf, size_t n);
-void *mkrbuf(size_t n);
+void *rmalloc(size_t n);
char *mkrstr(size_t n);
size_t rsize(size_t n);
diff --git a/util/libreboot-utils/lib/rand.c b/util/libreboot-utils/lib/rand.c
index 9edc8a5b..2cb0f56d 100644
--- a/util/libreboot-utils/lib/rand.c
+++ b/util/libreboot-utils/lib/rand.c
@@ -92,12 +92,12 @@ mkrstr(size_t n) /* emulates spkmodem-decode */
size_t i;
if (n == 0)
- err_exit(EPERM, "mkrbuf: zero-byte request");
+ err_exit(EPERM, "rmalloc: zero-byte request");
if (n >= SIZE_MAX - 1)
- err_exit(EOVERFLOW, "mkrbuf: overflow");
+ err_exit(EOVERFLOW, "rmalloc: overflow");
- if (if_err((s = mkrbuf(n + 1)) == NULL, EFAULT))
+ if (if_err((s = rmalloc(n + 1)) == NULL, EFAULT))
err_exit(EFAULT, "mkrstr: null");
for (i = 0; i < n; i++)
@@ -110,7 +110,7 @@ mkrstr(size_t n) /* emulates spkmodem-decode */
}
void *
-mkrbuf(size_t n)
+rmalloc(size_t n)
{
void *buf = NULL;
rset(vmalloc(&buf, n), n);
diff --git a/util/libreboot-utils/lottery.c b/util/libreboot-utils/lottery.c
index 0b3719a4..87637123 100644
--- a/util/libreboot-utils/lottery.c
+++ b/util/libreboot-utils/lottery.c
@@ -27,7 +27,7 @@ main(int argc, char **argv)
/* https://man.openbsd.org/pledge.2 */
xpledgex("stdio", NULL);
- buf = mkrbuf(BUFSIZ);
+ buf = rmalloc(BUFSIZ);
if (!memcmp(buf, buf + (BUFSIZ >> 1), BUFSIZ >> 1))
same = 1;