[PATCH] fix for non utf8 valid serial on storage devices

Danny Kukawka danny.kukawka at web.de
Thu Nov 10 11:08:32 PST 2005


Hi,

this is a patch to fix problems with non utf8 valid serials from storage 
devices. This is near the same code as for non valid volume labels. 
Additionally we add the serial only if there is at least one valid character 
left in the serial. Invalid characters replaced with '?'.

The reason: D-BUS accept only utf8 valid strings. If the string is invalid the 
storage device won't be added to HAL. (see bug report: 
https://launchpad.net/products/hal/+bug/2624)

This patch fixes also a compiler warning in hald/util.c

Please review.

Cheers,

Danny

 linux2/probing/Makefile.am     |    2 -
 linux2/probing/probe-storage.c |   37 ++++++++++++++++++++++++++++---
 util.c                         |    2 -
 3 files changed, 36 insertions(+), 5 deletions(-)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: hal-fix-invalid_utf8_serial.diff
Type: text/x-diff
Size: 3817 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/hal/attachments/20051110/4791e7ab/hal-fix-invalid_utf8_serial.bin


More information about the hal mailing list