On Fri,  1 May 2020 18:40:31 -0700
Matt Turner <[email protected]> wrote:

> Signed-off-by: Matt Turner <[email protected]>
> ---

Again, no reasoning




>  targets/support/filesystem-functions.sh | 19 -------------------
>  targets/support/target_image_setup.sh   | 20 ++++++--------------
>  2 files changed, 6 insertions(+), 33 deletions(-)
>  delete mode 100755 targets/support/filesystem-functions.sh
> 
> 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


Reply via email to