From: Karel Zak <kzak-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: Victor Lowther <victor.lowther-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 21/31] Some dracut cleanups and bashification.
Date: Mon, 9 Feb 2009 10:15:36 +0100 [thread overview]
Message-ID: <20090209091536.GA3205@nb.net.home> (raw)
In-Reply-To: <f81e4c7fec7010a32da9bd6e98c19eec70874af0.1234137268.git.victor.lowther-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
On Sun, Feb 08, 2009 at 04:36:15PM -0800, Victor Lowther wrote:
> Simplified get_dso_deps
>
> This takes advantage of several bash specific constructs to make
> get_dso_deps easier to read and understand.
> ---
> dracut-functions | 85 +++++++++++++++++------------------------------------
> 1 files changed, 27 insertions(+), 58 deletions(-)
>
> diff --git a/dracut-functions b/dracut-functions
> index 26254a4..d7717d8 100755
> --- a/dracut-functions
> +++ b/dracut-functions
> @@ -21,73 +21,42 @@
> # Peter Jones <pjones-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
> # Jeremy Katz <katzj-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
> # Jakub Jelinek <jakub-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
> -#
> -#
>
> IF_RTLD=""
> IF_dynamic=""
> get_dso_deps() {
> local bin="$1" ; shift
> + local FILES=() LDSO NAME IO FILE ADDR I1 n f TLIBDIR
>
> - declare -a FILES
> - declare -a NAMES
> -
> - local LDSO=$(LANG=C eu-readelf -l $bin 2>/dev/null |grep interpreter |awk {'print $4;'} |sed -e 's/]$//')
> - [ -z "$LDSO" -o "$LDSO" == "$bin" ] && local LDSO="$IF_RTLD"
> - [ -z "$LDSO" -o "$LDSO" == "$bin" ] && return 1
> - [ -z "$IF_RTLD" ] && IF_RTLD="$LDSO"
> + LDSO=$(LANG=C eu-readelf -l $bin 2>/dev/null | \
> + awk '/interpreter/ {print $4}' |sed -e 's/]$//')
awk '/interpreter/ { sub(/]$/,"",$4); print $4 }'
> + [[ $LDSO && $LDSO != $bin ]] || LDSO="$IF_RTLD"
> + [[ $LDSO && $LDSO != $bin ]] || return 1
> + [[ $IF_RTLD ]] || IF_RTLD="$LDSO"
IF_RTLD=${IF_RTLD:-"$LDSO"}
--
Karel Zak <kzak-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2009-02-09 9:15 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-09 0:34 [PATCH 01/31] Some dracut cleanups and bashification Victor Lowther
[not found] ` <5a1ca330d81aeebf879bb7f0950b7ae448f7be22.1234137267.git.victor.lowther-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2009-02-09 0:34 ` [PATCH 02/31] " Victor Lowther
2009-02-09 0:34 ` [PATCH 03/31] " Victor Lowther
2009-02-09 0:34 ` [PATCH 04/31] " Victor Lowther
2009-02-09 0:35 ` [PATCH 05/31] " Victor Lowther
2009-02-09 0:35 ` [PATCH 06/31] " Victor Lowther
2009-02-09 0:35 ` [PATCH 07/31] " Victor Lowther
2009-02-09 0:35 ` [PATCH 08/31] " Victor Lowther
2009-02-09 0:35 ` [PATCH 09/31] " Victor Lowther
2009-02-09 0:35 ` [PATCH 10/31] " Victor Lowther
2009-02-09 0:35 ` [PATCH 11/31] " Victor Lowther
2009-02-09 0:35 ` [PATCH 12/31] " Victor Lowther
2009-02-09 0:35 ` [PATCH 13/31] " Victor Lowther
2009-02-09 0:35 ` [PATCH 14/31] " Victor Lowther
2009-02-09 0:35 ` [PATCH 15/31] " Victor Lowther
2009-02-09 0:35 ` [PATCH 16/31] " Victor Lowther
2009-02-09 0:35 ` [PATCH 17/31] " Victor Lowther
2009-02-09 0:36 ` [PATCH 18/31] " Victor Lowther
2009-02-09 0:36 ` [PATCH 19/31] " Victor Lowther
2009-02-09 0:36 ` [PATCH 20/31] " Victor Lowther
2009-02-09 0:36 ` [PATCH 21/31] " Victor Lowther
[not found] ` <f81e4c7fec7010a32da9bd6e98c19eec70874af0.1234137268.git.victor.lowther-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2009-02-09 9:15 ` Karel Zak [this message]
2009-02-09 0:36 ` [PATCH 22/31] " Victor Lowther
2009-02-09 0:36 ` [PATCH 23/31] " Victor Lowther
[not found] ` <f393f138baf78d7bf99d31a4912b6ae313f1842f.1234137268.git.victor.lowther-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2009-02-09 9:24 ` Karel Zak
2009-02-09 0:36 ` [PATCH 24/31] " Victor Lowther
2009-02-09 0:36 ` [PATCH 25/31] " Victor Lowther
2009-02-09 0:36 ` [PATCH 26/31] " Victor Lowther
2009-02-09 0:36 ` [PATCH 27/31] " Victor Lowther
2009-02-09 0:36 ` [PATCH 28/31] " Victor Lowther
2009-02-09 0:36 ` [PATCH 29/31] " Victor Lowther
2009-02-09 0:36 ` [PATCH 30/31] " Victor Lowther
2009-02-09 0:37 ` [PATCH 31/31] " Victor Lowther
2009-02-09 17:15 ` [PATCH 01/31] " Dave Jones
[not found] ` <20090209171521.GA3646-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2009-02-09 18:57 ` Victor Lowther
[not found] ` <7FE9B1BD-31DA-4605-9881-3C42A05075E3-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2009-02-09 19:13 ` Dave Jones
[not found] ` <20090209191333.GA8665-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2009-02-09 21:32 ` Victor Lowther
2009-02-10 12:17 ` maximilian attems
[not found] ` <20090210121745.GC15532-U9r9yeDMy7A@public.gmane.org>
2009-02-10 16:56 ` Victor Lowther
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090209091536.GA3205@nb.net.home \
--to=kzak-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
--cc=initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=victor.lowther-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.