-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path0029.patch
More file actions
93 lines (80 loc) · 3.76 KB
/
0029.patch
File metadata and controls
93 lines (80 loc) · 3.76 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
From 731b37e92902fd659270da89b1b46f92264db538 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Mon, 7 May 2018 15:23:04 +0200
Subject: [PATCH] dracut-install.c: untabify
---
install/dracut-install.c | 25 ++++++++++++-------------
1 file changed, 12 insertions(+), 13 deletions(-)
diff --git a/install/dracut-install.c b/install/dracut-install.c
index 14fc0ab9..f104f664 100644
--- a/install/dracut-install.c
+++ b/install/dracut-install.c
@@ -402,9 +402,9 @@ static int resolve_deps(const char *src)
_cleanup_pclose_ FILE *fptr = NULL;
_cleanup_free_ char *cmd = NULL;
- buf = malloc(LINE_MAX);
- if (buf == NULL)
- return -errno;
+ buf = malloc(LINE_MAX);
+ if (buf == NULL)
+ return -errno;
if (strstr(src, ".so") == 0) {
_cleanup_close_ int fd = -1;
@@ -456,11 +456,11 @@ static int resolve_deps(const char *src)
break;
}
- /* musl ldd */
- if (strstr(buf, "Not a valid dynamic program"))
- break;
+ /* musl ldd */
+ if (strstr(buf, "Not a valid dynamic program"))
+ break;
- /* glibc */
+ /* glibc */
if (strstr(buf, "cannot execute binary file"))
break;
@@ -1061,7 +1061,7 @@ static int install_one(const char *src, const char *dst)
if (strchr(src, '/') == NULL) {
char **p = find_binary(src);
if (p) {
- char **q = NULL;
+ char **q = NULL;
STRV_FOREACH(q, p) {
char *newsrc = *q;
log_debug("dracut_install '%s' '%s'", newsrc, dst);
@@ -1097,7 +1097,7 @@ static int install_all(int argc, char **argv)
if (strchr(argv[i], '/') == NULL) {
char **p = find_binary(argv[i]);
if (p) {
- char **q = NULL;
+ char **q = NULL;
STRV_FOREACH(q, p) {
char *newsrc = *q;
log_debug("dracut_install '%s'", newsrc);
@@ -1440,12 +1440,11 @@ static int install_modules(int argc, char **argv)
for (i = 0; i < argc; i++) {
int r = 0;
int ret = -1;
-
log_debug("Handle module '%s'", argv[i]);
if (argv[i][0] == '/') {
_cleanup_kmod_module_unref_list_ struct kmod_list *modlist = NULL;
- _cleanup_free_ const char *modname = NULL;
+ _cleanup_free_ const char *modname = NULL;
r = kmod_module_new_from_path(ctx, argv[i], &mod_o);
if (r < 0) {
@@ -1532,7 +1531,7 @@ static int install_modules(int argc, char **argv)
for (FTSENT *ftsent = fts_read(fts); ftsent != NULL; ftsent = fts_read(fts)) {
_cleanup_kmod_module_unref_list_ struct kmod_list *modlist = NULL;
- _cleanup_free_ const char *modname = NULL;
+ _cleanup_free_ const char *modname = NULL;
if((ftsent->fts_info == FTS_D) && !check_module_path(ftsent->fts_accpath)) {
fts_set(fts, ftsent, FTS_SKIP);
@@ -1602,7 +1601,7 @@ static int install_modules(int argc, char **argv)
}
} else {
_cleanup_kmod_module_unref_list_ struct kmod_list *modlist = NULL;
- char *modname = argv[i];
+ char *modname = argv[i];
if (endswith(modname, ".ko")) {
int len = strlen(modname);