* [Patch] btrfs: fix two bugs in module-setup.sh
@ 2012-01-30 9:58 Cong Wang
[not found] ` <1327917535-31293-1-git-send-email-xiyou.wangcong-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: Cong Wang @ 2012-01-30 9:58 UTC (permalink / raw)
To: initramfs-u79uwXL29TY76Z2rM5mHXA; +Cc: Harald Hoyer, WANG Cong
First, $host_fs_types is an array.
Second, use strstr to match btrfs type.
Cc: Harald Hoyer <harald-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Signed-off-by: WANG Cong <xiyou.wangcong-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
diff --git a/modules.d/90btrfs/module-setup.sh b/modules.d/90btrfs/module-setup.sh
index a141dda..135abc6 100755
--- a/modules.d/90btrfs/module-setup.sh
+++ b/modules.d/90btrfs/module-setup.sh
@@ -13,8 +13,8 @@ check() {
[[ $hostonly ]] || [[ $mount_needs ]] && {
local _found
- for fs in $host_fs_types; do
- [[ "$fs" = "|btrfs" ]] && _found="1"
+ for fs in ${host_fs_types[@]}; do
+ strstr "$fs" "\|btrfs" && _found="1"
done
[[ $_found ]] || return 1
unset _found
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Patch] btrfs: fix two bugs in module-setup.sh
[not found] ` <1327917535-31293-1-git-send-email-xiyou.wangcong-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2012-02-07 11:14 ` Harald Hoyer
0 siblings, 0 replies; 2+ messages in thread
From: Harald Hoyer @ 2012-02-07 11:14 UTC (permalink / raw)
To: Cong Wang; +Cc: initramfs-u79uwXL29TY76Z2rM5mHXA
Am 30.01.2012 10:58, schrieb Cong Wang:
> First, $host_fs_types is an array.
> Second, use strstr to match btrfs type.
>
> Cc: Harald Hoyer <harald-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
> Signed-off-by: WANG Cong <xiyou.wangcong-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
>
> ---
> diff --git a/modules.d/90btrfs/module-setup.sh b/modules.d/90btrfs/module-setup.sh
> index a141dda..135abc6 100755
> --- a/modules.d/90btrfs/module-setup.sh
> +++ b/modules.d/90btrfs/module-setup.sh
> @@ -13,8 +13,8 @@ check() {
>
> [[ $hostonly ]] || [[ $mount_needs ]] && {
> local _found
> - for fs in $host_fs_types; do
> - [[ "$fs" = "|btrfs" ]] && _found="1"
> + for fs in ${host_fs_types[@]}; do
> + strstr "$fs" "\|btrfs" && _found="1"
> done
> [[ $_found ]] || return 1
> unset _found
>
pushed
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-02-07 11:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-30 9:58 [Patch] btrfs: fix two bugs in module-setup.sh Cong Wang
[not found] ` <1327917535-31293-1-git-send-email-xiyou.wangcong-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2012-02-07 11:14 ` Harald Hoyer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox