Skip to contentSkip to conversation

Quick question about ID_SERIAL

DISCUSSION Marcel Holtmann 2 participants 2 messages Jan 7, 2010

lore
Share & tools
lore
#0 lore raw

Hi Kay,

I have a quick question about ID_SERIAL property. Are these meant to be D-Bus object path compliant? Meaning they only contain a-z, A-Z, 0-9, _ characters? It would be actually nice to use them directly as an unique identifier without having to do extra transformations.

Regards

Marcel

#1 lore raw
Quoted 4 lines · Marcel Holtmann

I have a quick question about ID_SERIAL property. Are these meant to be D-Bus object path compliant? Meaning they only contain a-z, A-Z, 0-9, _ characters? It would be actually nice to use them directly as an unique identifier without having to do extra transformations.

Not really, it is usually just the string where different properties of a device are concatenated to a single string to create a useful symlink name. The string for a symlink can also contain valid utf8 sequences and "#+-.:=@_".

Some users of these strings need values which are translatable back to the original string, so in some cases we escape all non-allowed chars by "\x..".

We can not really stuff these things into a string that has only the characters allowed by D-Bus. You could only add a new variable, the current ones can not really be changed, as they are used in already established symlink names.

Cheers,
Kay