1 |
commit: 8690b6f5a0afffc56fbe46b6c29a91d8ba91578d |
2 |
Author: Matt Turner <mattst88 <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri May 1 06:46:52 2020 +0000 |
4 |
Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun May 3 22:55:53 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=8690b6f5 |
7 |
|
8 |
targets: Inline functions with one caller |
9 |
|
10 |
Inline check_bootargs and check_filesystem_type since they have only one |
11 |
caller (in a different file). |
12 |
|
13 |
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org> |
14 |
|
15 |
targets/support/bootloader-setup.sh | 21 +++++++++++++++++++-- |
16 |
targets/support/functions.sh | 22 ---------------------- |
17 |
2 files changed, 19 insertions(+), 24 deletions(-) |
18 |
|
19 |
diff --git a/targets/support/bootloader-setup.sh b/targets/support/bootloader-setup.sh |
20 |
index d507fe5e..d3a6b2dc 100755 |
21 |
--- a/targets/support/bootloader-setup.sh |
22 |
+++ b/targets/support/bootloader-setup.sh |
23 |
@@ -19,8 +19,25 @@ else |
24 |
fi |
25 |
|
26 |
extract_kernels $1/boot |
27 |
-check_bootargs |
28 |
-check_filesystem_type |
29 |
+ |
30 |
+# Add any additional options |
31 |
+if [ -n "${clst_livecd_bootargs}" ] |
32 |
+then |
33 |
+ for x in ${clst_livecd_bootargs} |
34 |
+ do |
35 |
+ cmdline_opts="${cmdline_opts} ${x}" |
36 |
+ done |
37 |
+fi |
38 |
+ |
39 |
+case ${clst_fstype} in |
40 |
+ squashfs) |
41 |
+ cmdline_opts="${cmdline_opts} looptype=squashfs loop=/image.squashfs" |
42 |
+ ;; |
43 |
+ jffs2) |
44 |
+ cmdline_opts="${cmdline_opts} looptype=jffs2 loop=/image.jffs2" |
45 |
+ ;; |
46 |
+esac |
47 |
+ |
48 |
|
49 |
default_append_line="root=/dev/ram0 init=/linuxrc ${cmdline_opts} ${custom_kopts} cdroot" |
50 |
[ -n "${clst_splash_theme}" ] && default_append_line="${default_append_line} splash=silent,theme:${clst_livecd_splash_theme} CONSOLE=/dev/tty1 quiet" |
51 |
|
52 |
diff --git a/targets/support/functions.sh b/targets/support/functions.sh |
53 |
index 601f5dc9..ac6710ad 100755 |
54 |
--- a/targets/support/functions.sh |
55 |
+++ b/targets/support/functions.sh |
56 |
@@ -216,25 +216,3 @@ extract_kernel() { |
57 |
mv ${1}/initramfs-* ${1}/${2}.igz |
58 |
fi |
59 |
} |
60 |
- |
61 |
-check_bootargs(){ |
62 |
- # Add any additional options |
63 |
- if [ -n "${clst_livecd_bootargs}" ] |
64 |
- then |
65 |
- for x in ${clst_livecd_bootargs} |
66 |
- do |
67 |
- cmdline_opts="${cmdline_opts} ${x}" |
68 |
- done |
69 |
- fi |
70 |
-} |
71 |
- |
72 |
-check_filesystem_type(){ |
73 |
- case ${clst_fstype} in |
74 |
- squashfs) |
75 |
- cmdline_opts="${cmdline_opts} looptype=squashfs loop=/image.squashfs" |
76 |
- ;; |
77 |
- jffs2) |
78 |
- cmdline_opts="${cmdline_opts} looptype=jffs2 loop=/image.jffs2" |
79 |
- ;; |
80 |
- esac |
81 |
-} |