Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

Commit

Permalink
scripts: Handle missing partitions in collect script
Browse files Browse the repository at this point in the history
Add an extra check in the data collection script to ensure partitions
are found in the image.

Signed-off-by: James O. D. Hunt <[email protected]>
  • Loading branch information
jodh-intel committed Mar 21, 2019
1 parent c70ba48 commit bdf6b2d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion data/kata-collect-data.sh.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
#
# Copyright (c) 2017-2018 Intel Corporation
# Copyright (c) 2017-2019 Intel Corporation
#
# SPDX-License-Identifier: Apache-2.0
#
Expand Down Expand Up @@ -407,6 +407,11 @@ get_image_details()
fi

partitions=$(get_partitions "$loop_device")
if [ -z "$partitions" ]; then
release_device "$loop_device"
continue
fi

count=$(echo "$partitions"|wc -l)

expected=1
Expand Down

0 comments on commit bdf6b2d

Please sign in to comment.