Mail Archives: cygwin/2010/05/26/10:35:03
On May 26 17:42, Andrey Repin wrote:
> Greetings, Corinna Vinschen!
>
> >> > $ cat >a.dat
> >> > /proc/registry/HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Control/Syst
> >> > emBootDevice
>
> > This trailing NUL character was always there, already with Cygwin 1.5.
> > It's part of the file content. If strings are stored with a trailing
> > NUL in a file, you don't want Cygwin to remove it for you, right?
>
> Wrong. The training NULL is a string value terminator for REG_SZ variables,
> also a string separator for REG_MULTI_SZ ones. (Which ends with a spare NULL)
> It must not be exposed to the user.
I disagree. When you're using tools like regtool, you're right. But
when accessing the registry as *files* via the virtual /proc filesystem,
you want the file content. And the file contains the trailing NUL in
REG_SZ and REG_EXPAND_SZ values, and multiple NULs in REG_MULTI_SZ values.
What do you suppose Cygwin should do with the NULs in REG_MULTI_SZ values?
Just remove them?
> BTW, get it as a bugreport - reading REG_MULTI_SZ from /proc/registry returns
> only first string.
Yep, that's a bug. I'll look into it.
Thanks for the report,
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Project Co-Leader cygwin AT cygwin DOT com
Red Hat
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
- Raw text -