Merge lp:~salgado/linaro-image-tools/remove-extra-get-devs-by-id-call into lp:linaro-image-tools/11.11

Proposed by Guilherme Salgado
Status: Merged
Approved by: James Westby
Approved revision: 168
Merged at revision: 167
Proposed branch: lp:~salgado/linaro-image-tools/remove-extra-get-devs-by-id-call
Merge into: lp:linaro-image-tools/11.11
Diff against target: 87 lines (+32/-31)
1 file modified
linaro-media-create (+32/-31)
To merge this branch: bzr merge lp:~salgado/linaro-image-tools/remove-extra-get-devs-by-id-call
Reviewer Review Type Date Requested Status
James Westby (community) Approve
Review via email: mp+40739@code.launchpad.net

Description of the change

Remove an unnecessary call to get_device_by_id and fix some indentation

To post a comment you must log in.
Revision history for this message
Peter Maydell (pmaydell) wrote :

I would prefer not to mix whitespace cleanup and semantic changes in the same commit...

167. By Guilherme Salgado

Properly indent code. I wish we had some form of watchdog to at least prevent <tab>s in the code

168. By Guilherme Salgado

Remove an unnecessary call to get_device_by_id and fix some indentation

Revision history for this message
Guilherme Salgado (salgado) wrote :

On Fri, 2010-11-12 at 17:14 +0000, Peter Maydell wrote:
> I would prefer not to mix whitespace cleanup and semantic changes in the same commit...

And I would prefer that I didn't have to fix indentation and replace
<tab>s with spaces. ;)

In general I don't mix cleanup with semantic changes, but in this case
the semantic change is a one-liner, so I didn't bother. Anyway, I've
split that into a couple commits (r167 and r168) so they can be reviewed
(or reverted, if needed) independently.

Revision history for this message
James Westby (james-w) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'linaro-media-create'
--- linaro-media-create 2010-11-09 20:48:16 +0000
+++ linaro-media-create 2010-11-12 17:24:20 +0000
@@ -451,7 +451,7 @@
451451
452 for d in $loop_devices; do452 for d in $loop_devices; do
453 if [ -n "$d" ]; then453 if [ -n "$d" ]; then
454 sudo losetup -d "$d"454 sudo losetup -d "$d"
455 fi455 fi
456 done456 done
457457
@@ -517,35 +517,37 @@
517517
518prepare_partitions() {518prepare_partitions() {
519519
520echo -n "waiting for partitioning to settle ..."520 # sync and sleep a bit as the partitions may have been created in the
521sync521 # previous step.
522sleep 3522 echo -n "waiting for partitioning to settle ..."
523echo "done."523 sync
524get_device_by_id524 sleep 3
525525 echo "done."
526if [ "$BOOTFS_STEP" ]; then526 get_device_by_id
527 echo ""527
528 echo "Formating Boot Partition"528 if [ "$BOOTFS_STEP" ]; then
529 echo ""529 echo ""
530 if [ -z "$BOOTFS" ]; then530 echo "Formating Boot Partition"
531 echo "Partition $BOOTFS does not exist"531 echo ""
532 exit 2532 if [ -z "$BOOTFS" ]; then
533 else533 echo "Partition $BOOTFS does not exist"
534 sudo mkfs.vfat -F ${FAT_SIZE} ${BOOTFS} -n ${BOOT_LABEL}534 exit 2
535 fi535 else
536fi536 sudo mkfs.vfat -F ${FAT_SIZE} ${BOOTFS} -n ${BOOT_LABEL}
537537 fi
538if [ "$ROOTFS_STEP" ]; then538 fi
539 echo ""539
540 echo "Formating ${RFS} Partition"540 if [ "$ROOTFS_STEP" ]; then
541 echo ""541 echo ""
542 if [ -z "$ROOTFS" ]; then542 echo "Formating ${RFS} Partition"
543 echo "Partition $ROOTFS does not exist"543 echo ""
544 exit 2544 if [ -z "$ROOTFS" ]; then
545 else545 echo "Partition $ROOTFS does not exist"
546 sudo mkfs.${RFS} -U "$RFS_UUID" ${ROOTFS} -L ${RFS_LABEL}546 exit 2
547 fi547 else
548fi548 sudo mkfs.${RFS} -U "$RFS_UUID" ${ROOTFS} -L ${RFS_LABEL}
549 fi
550 fi
549}551}
550552
551populate_boot() {553populate_boot() {
@@ -907,7 +909,6 @@
907else909else
908 echo "Warning, --hwpack <filename> was not specified, the result is unlikely to be functional without manual effort to setup uImage, MLO, u-boot.bin and so as as appropriate for your hardware."910 echo "Warning, --hwpack <filename> was not specified, the result is unlikely to be functional without manual effort to setup uImage, MLO, u-boot.bin and so as as appropriate for your hardware."
909fi911fi
910get_device_by_id
911for func in $DEPLOY_STEPS; do912for func in $DEPLOY_STEPS; do
912 $func913 $func
913done914done

Subscribers

People subscribed via source and target branches