dracut/0038.patch

45 lines
1.3 KiB
Diff
Raw Normal View History

2018-01-05 09:46:51 +00:00
From 2bdce3d461a2d790d3bde41efb533c5e2881ee76 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@hoyer.xyz>
Date: Wed, 6 Dec 2017 14:49:42 +0100
Subject: [PATCH] Merge pull request #311 from
dracut-mailing-devs/1512379451-17727-1-git-send-email-piliu@redhat.com
dracut.sh: for_each_host_xx() function should indicate the empty case
---
dracut-functions.sh | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/dracut-functions.sh b/dracut-functions.sh
index 112b2434..575bd4a6 100755
--- a/dracut-functions.sh
+++ b/dracut-functions.sh
@@ -468,7 +468,8 @@ for_each_host_dev_fs()
local _dev
local _ret=1
- [[ "${#host_fs_types[@]}" ]] || return 0
+ [[ "${#host_fs_types[@]}" ]] || return 2
+
for _dev in "${!host_fs_types[@]}"; do
$_func "$_dev" "${host_fs_types[$_dev]}" && _ret=0
@@ -527,7 +528,7 @@ for_each_host_dev_and_slaves_all()
local _dev
local _ret=1
- [[ "${host_devs[@]}" ]] || return 0
+ [[ "${host_devs[@]}" ]] || return 2
for _dev in "${host_devs[@]}"; do
[[ -b "$_dev" ]] || continue
@@ -543,7 +544,7 @@ for_each_host_dev_and_slaves()
local _func="$1"
local _dev
- [[ "${host_devs[@]}" ]] || return 0
+ [[ "${host_devs[@]}" ]] || return 2
for _dev in "${host_devs[@]}"; do
[[ -b "$_dev" ]] || continue