Am 06.04.25 um 21:19 schrieb Thomas Lamprecht:
> did a s/dismanagement/disk management/ for the subject on applying this.
> 
> Am 12.03.25 um 09:38 schrieb Shannon Sterz:
>> some manufacturer seem to report leading white space in the
>> `ID_SERIAL_SHORT` field. the regex failed here, as it just didn't
>> match the whitespace at all.
>>
>> reported on the forum:
>> https://forum.proxmox.com/threads/nvme-drive-serial-unknown.163480/#post-754953
>>
>> Signed-off-by: Shannon Sterz <s.st...@proxmox.com>
>> ---
>>
>> not sure this is the ideal fix, but i tried to stay on the more
>> conservative side here. alternatively the regex could be:
>>
>> ^E: ID_SERIAL_SHORT=(.+)$
>>
>> but then the whitespace would be considered as part of the serial, not
>> sure this is intended or could have negative side effects.
> 
> As serials are often printed on labels it would be really error
> prone to include spaces in them.
> 
>>
>>  src/PVE/Diskmanage.pm | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>>
> 
> applied, thanks! What about spaces at the end though, are they already
> parsed out and thus allowed?

And I suppose we should make the behavior in PBS consistent with this
too? There, we get the value via udev_device_get_property_value() via
the udev crate. Haven't checked, but I'd be surprised if that wouldn't
pass along the value verbatim. OTOH, one could also argue that the
correct behavior is that, i.e. be transparent between user and udev.

We could also ask upstream if udev considers including the whitespace
correct behavior in the first place?


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to