summaryrefslogtreecommitdiff
path: root/sysutils/genimage/files
diff options
context:
space:
mode:
authorYuri Victorovich <yuri@FreeBSD.org>2023-01-06 07:31:22 -0800
committerYuri Victorovich <yuri@FreeBSD.org>2023-01-06 10:17:45 -0800
commitf5858d0bce93eaa9bc455da3382a34b778939cd6 (patch)
tree46e79663e448891c2a9a44664695939bba117d68 /sysutils/genimage/files
parentdevel/fnm: New port: Fast and simple Node.js version manager, built in Rust (diff)
sysutils/genimage: New port: Tool to generate multiple filesystem and flash images from a tree
Diffstat (limited to 'sysutils/genimage/files')
-rw-r--r--sysutils/genimage/files/patch-config.c19
-rw-r--r--sysutils/genimage/files/patch-image-android-sparse.c11
-rw-r--r--sysutils/genimage/files/patch-image-hd.c11
-rw-r--r--sysutils/genimage/files/patch-image-rauc.c11
-rw-r--r--sysutils/genimage/files/patch-image-vfat.c11
5 files changed, 63 insertions, 0 deletions
diff --git a/sysutils/genimage/files/patch-config.c b/sysutils/genimage/files/patch-config.c
new file mode 100644
index 000000000000..1a1663c75946
--- /dev/null
+++ b/sysutils/genimage/files/patch-config.c
@@ -0,0 +1,19 @@
+--- config.c.orig 2023-01-06 17:56:22 UTC
++++ config.c
+@@ -21,6 +21,7 @@
+ #include <errno.h>
+ #include <getopt.h>
+ #include <unistd.h>
++#include <sys/syslimits.h>
+
+ #include "genimage.h"
+
+@@ -259,7 +260,7 @@ static char *abspath(const char *path)
+ if (*path == '/')
+ return strdup(path);
+
+- xasprintf(&p, "%s/%s", get_current_dir_name(), path);
++ xasprintf(&p, "%s/%s", getcwd(NULL, PATH_MAX), path);
+
+ return p;
+ }
diff --git a/sysutils/genimage/files/patch-image-android-sparse.c b/sysutils/genimage/files/patch-image-android-sparse.c
new file mode 100644
index 000000000000..62644b0a8fd1
--- /dev/null
+++ b/sysutils/genimage/files/patch-image-android-sparse.c
@@ -0,0 +1,11 @@
+--- image-android-sparse.c.orig 2023-01-06 17:52:40 UTC
++++ image-android-sparse.c
+@@ -15,7 +15,7 @@
+ */
+
+ #include <confuse.h>
+-#include <endian.h>
++#include <sys/endian.h>
+ #include <errno.h>
+ #include <fcntl.h>
+ #include <stdlib.h>
diff --git a/sysutils/genimage/files/patch-image-hd.c b/sysutils/genimage/files/patch-image-hd.c
new file mode 100644
index 000000000000..0b3465c91655
--- /dev/null
+++ b/sysutils/genimage/files/patch-image-hd.c
@@ -0,0 +1,11 @@
+--- image-hd.c.orig 2023-01-06 17:53:09 UTC
++++ image-hd.c
+@@ -22,7 +22,7 @@
+ #include <stdlib.h>
+ #include <errno.h>
+ #include <inttypes.h>
+-#include <endian.h>
++#include <sys/endian.h>
+ #include <stdbool.h>
+ #include <unistd.h>
+ #include <sys/types.h>
diff --git a/sysutils/genimage/files/patch-image-rauc.c b/sysutils/genimage/files/patch-image-rauc.c
new file mode 100644
index 000000000000..225db5c40bd0
--- /dev/null
+++ b/sysutils/genimage/files/patch-image-rauc.c
@@ -0,0 +1,11 @@
+--- image-rauc.c.orig 2023-01-06 17:59:29 UTC
++++ image-rauc.c
+@@ -95,7 +95,7 @@ static int rauc_generate(struct image *image)
+ }
+
+ /* create parent directories if target needs it */
+- path = strdupa(target);
++ path = strdup(target); // XXX causes memory leak
+ tmp = strrchr(path, '/');
+ if (tmp) {
+ *tmp = '\0';
diff --git a/sysutils/genimage/files/patch-image-vfat.c b/sysutils/genimage/files/patch-image-vfat.c
new file mode 100644
index 000000000000..e3d524cd9e24
--- /dev/null
+++ b/sysutils/genimage/files/patch-image-vfat.c
@@ -0,0 +1,11 @@
+--- image-vfat.c.orig 2023-01-06 18:01:33 UTC
++++ image-vfat.c
+@@ -47,7 +47,7 @@ static int vfat_generate(struct image *image)
+ struct image *child = image_get(part->image);
+ const char *file = imageoutfile(child);
+ const char *target = part->name;
+- char *path = strdupa(target);
++ char *path = strdup(target); // XXX causes memory leak
+ char *next = path;
+
+ while ((next = strchr(next, '/')) != NULL) {