:: Re: [DNG] vdev
トップ ページ
このメッセージを削除
このメッセージに返信
著者: Ralph Ronnquist
日付:  
To: dng
題目: Re: [DNG] vdev
On 11/08/16 00:13, richard lucassen wrote:
> ...
>> diff -rc clean/usr/lib/vdev/udev-compat.sh
>>       echo "event-put $_DEVICE_ID" >> /tmp/udev-compat.log
>>       echo "" >> /tmp/udev-compat.log

>>
>> -    _RC=$?

>
> What are the consequences of moving this _RC?
>
>> +    _RC=$?
>>       echo "event-put $_DEVICE_ID" >> /tmp/udev-compat.log
>>       echo "" >> /tmp/udev-compat.log


Since '$?' is 'the result code of last command", it's IMO best placed
immediately after the command whose result code to capture. Here,
previously, it captured the result of the (failed, as it were) attempt
to echo to the log file, rather than the result of event-put.

Ralph.