From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 1D22D138351 for ; Sun, 3 May 2020 22:04:41 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id EDB7FE09D0; Sun, 3 May 2020 22:04:38 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id C4583E09D0 for ; Sun, 3 May 2020 22:04:37 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 6899834F53A for ; Sun, 3 May 2020 22:04:36 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id E7FB5211 for ; Sun, 3 May 2020 22:04:34 +0000 (UTC) From: "Matt Turner" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Matt Turner" Message-ID: <1588543458.e422e667d0d5bd69bff8e6f4079464d67177e5d3.mattst88@gentoo> Subject: [gentoo-commits] proj/catalyst:pending/mattst88 commit in: targets/support/ X-VCS-Repository: proj/catalyst X-VCS-Files: targets/support/bootloader-setup.sh targets/support/functions.sh X-VCS-Directories: targets/support/ X-VCS-Committer: mattst88 X-VCS-Committer-Name: Matt Turner X-VCS-Revision: e422e667d0d5bd69bff8e6f4079464d67177e5d3 X-VCS-Branch: pending/mattst88 Date: Sun, 3 May 2020 22:04:34 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 32e8a311-6802-49ff-b8ce-df880147623e X-Archives-Hash: 85eca7ffc5dd094edb009b6e4860c80f commit: e422e667d0d5bd69bff8e6f4079464d67177e5d3 Author: Matt Turner gentoo org> AuthorDate: Fri May 1 06:46:52 2020 +0000 Commit: Matt Turner gentoo org> CommitDate: Sun May 3 22:04:18 2020 +0000 URL: https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=e422e667 targets: Inline functions with one caller Inline check_bootargs and check_filesystem_type since they have only one caller (in a different file). Signed-off-by: Matt Turner gentoo.org> targets/support/bootloader-setup.sh | 21 +++++++++++++++++++-- targets/support/functions.sh | 22 ---------------------- 2 files changed, 19 insertions(+), 24 deletions(-) diff --git a/targets/support/bootloader-setup.sh b/targets/support/bootloader-setup.sh index d507fe5e..d3a6b2dc 100755 --- a/targets/support/bootloader-setup.sh +++ b/targets/support/bootloader-setup.sh @@ -19,8 +19,25 @@ else fi extract_kernels $1/boot -check_bootargs -check_filesystem_type + +# Add any additional options +if [ -n "${clst_livecd_bootargs}" ] +then + for x in ${clst_livecd_bootargs} + do + cmdline_opts="${cmdline_opts} ${x}" + done +fi + +case ${clst_fstype} in + squashfs) + cmdline_opts="${cmdline_opts} looptype=squashfs loop=/image.squashfs" + ;; + jffs2) + cmdline_opts="${cmdline_opts} looptype=jffs2 loop=/image.jffs2" + ;; +esac + default_append_line="root=/dev/ram0 init=/linuxrc ${cmdline_opts} ${custom_kopts} cdroot" [ -n "${clst_splash_theme}" ] && default_append_line="${default_append_line} splash=silent,theme:${clst_livecd_splash_theme} CONSOLE=/dev/tty1 quiet" diff --git a/targets/support/functions.sh b/targets/support/functions.sh index 601f5dc9..ac6710ad 100755 --- a/targets/support/functions.sh +++ b/targets/support/functions.sh @@ -216,25 +216,3 @@ extract_kernel() { mv ${1}/initramfs-* ${1}/${2}.igz fi } - -check_bootargs(){ - # Add any additional options - if [ -n "${clst_livecd_bootargs}" ] - then - for x in ${clst_livecd_bootargs} - do - cmdline_opts="${cmdline_opts} ${x}" - done - fi -} - -check_filesystem_type(){ - case ${clst_fstype} in - squashfs) - cmdline_opts="${cmdline_opts} looptype=squashfs loop=/image.squashfs" - ;; - jffs2) - cmdline_opts="${cmdline_opts} looptype=jffs2 loop=/image.jffs2" - ;; - esac -}