Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 153678 - sys-fs/device-mapper: code flow error in dm-start.sh
Summary: sys-fs/device-mapper: code flow error in dm-start.sh
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-11-01 06:38 UTC by Daniel Drake (RETIRED)
Modified: 2006-11-01 11:03 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
fix (out,868 bytes, patch)
2006-11-01 06:38 UTC, Daniel Drake (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Drake (RETIRED) gentoo-dev 2006-11-01 06:38:16 UTC
dmvolume_exists has this loop

	/sbin/dmsetup ls 2>/dev/null | \
	while read line ; do
		for x in ${line} ; do
			[[ ${x} == "${volume}" ]] && return 0
			# We only want to check the volume name
			break
		done
	done
	return 1

The intention is that the "return 0" inside the loop causes the function to return with value 0. However, as this loop is being run in a pipe, the return only causes exit out of the loop, meaning that this function *always* returns 1.
Comment 1 Daniel Drake (RETIRED) gentoo-dev 2006-11-01 06:38:53 UTC
Created attachment 100958 [details, diff]
fix
Comment 2 SpanKY gentoo-dev 2006-11-01 10:24:59 UTC
nobody at the moment cares about this package ... ive just been bumping it for users

if you care, add the fix yourself :p
Comment 3 Daniel Drake (RETIRED) gentoo-dev 2006-11-01 11:03:34 UTC
ok, done