[make-initrd] [PATCH v1 16/41] fork pipeline: waitdev: get_dev_wpfx() function added

Leonid Krivoshein klark.devel at gmail.com
Sun Sep 26 22:42:11 MSK 2021


26.09.2021 17:06, Alexey Gladkov пишет:
> On Fri, Sep 24, 2021 at 06:57:08PM +0300, Leonid Krivoshein wrote:
>> ---
>>   .../data/lib/uevent/filters/bootchain-waitdev | 19 ++++++++++++++++++-
>>   1 file changed, 18 insertions(+), 1 deletion(-)
>>
>> diff --git a/make-initrd/features/bootchain-waitdev/data/lib/uevent/filters/bootchain-waitdev b/make-initrd/features/bootchain-waitdev/data/lib/uevent/filters/bootchain-waitdev
>> index 272aee7..13d90fa 100755
>> --- a/make-initrd/features/bootchain-waitdev/data/lib/uevent/filters/bootchain-waitdev
>> +++ b/make-initrd/features/bootchain-waitdev/data/lib/uevent/filters/bootchain-waitdev
>> @@ -3,6 +3,23 @@
>>   . /.initrd/initenv
>>   . initrd-sh-functions
>>   +get_dev_wpfx()
> Я-то думал, что только чехи на гласных экономят!
>
> Что такое wpfx ?

with prefix

Извини, я думал это распространённое сокращение.
Можно обозвать get_dev_prefixed, так нормально?


> Добавь описание коммиту.

OK



>> +{
>> +	local retval="$1" name="$2"
>> +
>> +	case "$name" in
>> +	CDROM:*)
>> +		[ "${ID_CDROM-}" = 1 ] ||
>> +		[ "${ID_FS_TYPE-}" = iso9660 ] ||
>> +			return 1
>> +		name="${name#CDROM:}"
>> +		name="${name:-/dev/sr0}"
>> +		;;
>> +	esac
>> +
>> +	get_dev "$retval" "$name"
>> +}
>> +
>>   mkdir -p -- /.initrd/bootchain/waitdev
>>   cd /.initrd/bootchain/waitdev/
>>   @@ -10,7 +27,7 @@ i=0
>>   while [ "$i" -lt "${WAITDEV:-0}" ]; do
>>   	eval "spec=\"\${WAITDEV$i-}\""
>>   -	if [ -n "$spec" ] && get_dev dev "$spec"; then
>> +	if [ -n "$spec" ] && get_dev_wpfx dev "$spec"; then
>>   		printf '%s\n' "$dev" > "$i"
>>   	fi
>>   -- 2.21.0
>>
>>
>> _______________________________________________
>> Make-initrd mailing list
>> Make-initrd at lists.altlinux.org
>> https://lists.altlinux.org/mailman/listinfo/make-initrd
>>

-- 
Best regards,
Leonid Krivoshein.



More information about the Make-initrd mailing list