summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-03 14:01:35 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-03 14:01:35 +0000
commite6f2eaf47a177a8eca054d1d70a1b6287e8c3521 (patch)
treec5719e819a9e37df4b54affd61438f382ec38a8f /src
parentAdding upstream version 060+5. (diff)
downloaddracut-upstream/102.tar.xz
dracut-upstream/102.zip
Adding upstream version 102.upstream/102
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--src/dracut-cpio/src/main.rs2
-rw-r--r--src/install/dracut-install.c15
-rw-r--r--src/install/util.h2
-rw-r--r--src/util/util.c2
4 files changed, 16 insertions, 5 deletions
diff --git a/src/dracut-cpio/src/main.rs b/src/dracut-cpio/src/main.rs
index c3bfe90..89662fe 100644
--- a/src/dracut-cpio/src/main.rs
+++ b/src/dracut-cpio/src/main.rs
@@ -286,7 +286,7 @@ fn archive_path<W: Seek + Write>(
mut writer: W,
) -> std::io::Result<()> {
let inpath = path;
- let mut outpath = path.clone();
+ let mut outpath = path;
let mut datalen: u32 = 0;
let mut rmajor: u32 = 0;
let mut rminor: u32 = 0;
diff --git a/src/install/dracut-install.c b/src/install/dracut-install.c
index 485143a..0c34363 100644
--- a/src/install/dracut-install.c
+++ b/src/install/dracut-install.c
@@ -608,7 +608,7 @@ static int resolve_deps(const char *src)
break;
if (strstr(buf, "cannot be preloaded"))
- break;
+ continue;
if (strstr(buf, destrootdir))
break;
@@ -828,7 +828,7 @@ static int dracut_install(const char *orig_src, const char *orig_dst, bool isdir
if (ret == 0) {
if (resolvedeps && S_ISREG(sb.st_mode) && (sb.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) {
log_debug("'%s' already exists, but checking for any deps", fulldstpath);
- ret = resolve_deps(fulldstpath + sysrootdirlen);
+ ret = resolve_deps(fullsrcpath + sysrootdirlen);
} else
log_debug("'%s' already exists", fulldstpath);
@@ -2275,6 +2275,17 @@ finish2:
hashmap_free(modules_suppliers);
hashmap_free(processed_suppliers);
+ if (arg_mod_filter_path)
+ regfree(&mod_filter_path);
+ if (arg_mod_filter_nopath)
+ regfree(&mod_filter_nopath);
+ if (arg_mod_filter_symbol)
+ regfree(&mod_filter_symbol);
+ if (arg_mod_filter_nosymbol)
+ regfree(&mod_filter_nosymbol);
+ if (arg_mod_filter_noname)
+ regfree(&mod_filter_noname);
+
strv_free(firmwaredirs);
strv_free(pathdirs);
return r;
diff --git a/src/install/util.h b/src/install/util.h
index f022f15..358afc8 100644
--- a/src/install/util.h
+++ b/src/install/util.h
@@ -113,7 +113,7 @@ bool streq_ptr(const char *a, const char *b);
#define newdup(t, p, n) ((t*) memdup(p, sizeof(t)*(n)))
-#define malloc0(n) (calloc((n), 1))
+#define malloc0(n) (calloc(1, (n)))
static inline const char *yes_no(bool b)
{
diff --git a/src/util/util.c b/src/util/util.c
index b3498df..1d15241 100644
--- a/src/util/util.c
+++ b/src/util/util.c
@@ -273,7 +273,7 @@ static int getargs(int argc, char **argv)
cmdline = next_arg(cmdline, &key, &value);
if (strcmp(key, search_key) == 0) {
if (search_value) {
- if (strcmp(value, search_value) == 0) {
+ if (value && strcmp(value, search_value) == 0) {
printf("%s\n", value);
found_value = true;
}