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 D3E3F138353 for ; Sun, 3 May 2020 22:04:39 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E24A6E09C8; 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 C4546E09C8 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 2F4E534EFAD 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 AF077206 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.415e88f301517f3efc4289912889509a67fe5115.mattst88@gentoo> Subject: [gentoo-commits] proj/catalyst:pending/mattst88 commit in: targets/support/ X-VCS-Repository: proj/catalyst X-VCS-Files: targets/support/filesystem-functions.sh targets/support/target_image_setup.sh X-VCS-Directories: targets/support/ X-VCS-Committer: mattst88 X-VCS-Committer-Name: Matt Turner X-VCS-Revision: 415e88f301517f3efc4289912889509a67fe5115 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: 0958ce12-e54c-4dea-8a65-900a12d6cdec X-Archives-Hash: 752f05d74ac338b30fb88162aede2c96 commit: 415e88f301517f3efc4289912889509a67fe5115 Author: Matt Turner gentoo org> AuthorDate: Fri May 1 06:40:26 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=415e88f3 targets: Inline filesystem-functions.sh Inline create_squashfs and create_jffs2 since they're called only from one place (in a different file). Signed-off-by: Matt Turner gentoo.org> targets/support/filesystem-functions.sh | 19 ------------------- targets/support/target_image_setup.sh | 20 ++++++-------------- 2 files changed, 6 insertions(+), 33 deletions(-) diff --git a/targets/support/filesystem-functions.sh b/targets/support/filesystem-functions.sh deleted file mode 100755 index a95ae0b9..00000000 --- a/targets/support/filesystem-functions.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash - -# Dont forget to update functions.sh check_looptype -# $1 is the target directory for the filesystem - -create_squashfs() { - echo "Creating squashfs..." - export loopname="image.squashfs" - gensquashfs -D "${clst_destpath}" ${clst_fsops} "$1/${loopname}" \ - || die "gensquashfs failed, did you emerge squashfs-tools-ng?" -} - -create_jffs2(){ - echo "Creating jffs2..." - export loopname="image.jffs" - # fs_check /usr/sbin/mkfs.jffs2 jffs2 sys-fs/mtd - mkfs.jffs2 --root=${clst_destpath} --output=$1/${loopname} ${clst_fsops} \ - || die "Could not create a jffs2 filesystem" -} diff --git a/targets/support/target_image_setup.sh b/targets/support/target_image_setup.sh index 423dc4c4..03cb4741 100755 --- a/targets/support/target_image_setup.sh +++ b/targets/support/target_image_setup.sh @@ -1,25 +1,17 @@ #!/bin/bash source ${clst_shdir}/support/functions.sh -source ${clst_shdir}/support/filesystem-functions.sh -# Make the directory if it doesnt exist -mkdir -p $1 +mkdir -p "${1}" -loopret=1 +echo "Creating ${clst_fstype} filesystem" case ${clst_fstype} in squashfs) - create_squashfs $1 - loopret=$? + gensquashfs -D "${clst_destpath}" "${clst_fsops}" "${1}/image.squashfs" \ + || die "Failed to create squashfs filesystem" ;; jffs2) - create_jffs2 $1 - loopret=$? + mkfs.jffs2 --root="${clst_destpath}" --output="${1}/image.jffs" "${clst_fsops}" \ + || die "Failed to create jffs2 filesystem" ;; esac - -if [ ${loopret} = "1" ] -then - die "Filesystem not setup" -fi -exit $loopret