Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Darren Hart <dvhart@linux.intel.com>
To: Koen Kooi <koen@dominion.thruhere.net>
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [PATCH] mkefidisk.sh: Cope with translations and modelnames with 'Disk' in it.
Date: Fri, 08 Mar 2013 09:09:44 -0800	[thread overview]
Message-ID: <513A1B58.4060702@linux.intel.com> (raw)
In-Reply-To: <1362747705-19277-1-git-send-email-koen@dominion.thruhere.net>



On 03/08/2013 05:01 AM, Koen Kooi wrote:
> The script greps for 'Disk', which doesn't work when your crazy Dutch distro has parted call it 'Schijf', so force LANG=C.

Whoopsie :-)

> 
> The second problem is that 'Disk' might be a substring in the Model entry:
> 
> [root@Angstrom-F16-vm-rpm contrib] # parted /dev/sdc  unit mb print
> Model: SanDisk SDDR-113 (scsi)
> Disk /dev/sdc: 3905MB
> 
> Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
> ---
>  scripts/contrib/mkefidisk.sh | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/scripts/contrib/mkefidisk.sh b/scripts/contrib/mkefidisk.sh
> index 38e2217..44ac130 100755
> --- a/scripts/contrib/mkefidisk.sh
> +++ b/scripts/contrib/mkefidisk.sh
> @@ -18,6 +18,8 @@
>  # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
>  #
>  
> +LANG=C
> +
>  #
>  # Defaults
>  #
> @@ -123,7 +125,7 @@ fi
>  #
>  # Partition $DEVICE
>  #
> -DEVICE_SIZE=$(parted $DEVICE unit mb print | grep Disk | cut -d" " -f 3 | sed -e "s/MB//")
> +DEVICE_SIZE=$(parted $DEVICE unit mb print | grep ^Disk | cut -d" " -f 3 | sed -e "s/MB//")

Looks like something like "^Disk /" might be better still?




-- 
Darren Hart
Intel Open Source Technology Center
Yocto Project - Technical Lead - Linux Kernel



  reply	other threads:[~2013-03-08 17:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-08 13:01 [PATCH] mkefidisk.sh: Cope with translations and modelnames with 'Disk' in it Koen Kooi
2013-03-08 17:09 ` Darren Hart [this message]
2013-03-08 17:28   ` Koen Kooi

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=513A1B58.4060702@linux.intel.com \
    --to=dvhart@linux.intel.com \
    --cc=koen@dominion.thruhere.net \
    --cc=openembedded-core@lists.openembedded.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox