This is the mail archive of the cygwin-developers mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: /proc/registry write access


On Wed, 29 Mar 2006, Christian Franke wrote:

> [snip]
> A) Add a type suffix to value name if a new value is created.
> For existing values, the suffix is optional and must be correct if present.
>
> The suffix separator should be rarely used in registry value names and
> allowed for windows filenames.
> Therefore ':' cannot be used, I would suggest ','.

One question at this point: why do you think it has to be allowed in
Windows filenames?  This is going to be used as a separator for the
metadata that was not present before.  There will be no physical
manifestation of these filenames on the disk.  So why does it need to be
restricted to valid Windows filename characters?

> Open question: Allow type change by renaming?

Here's another one: mapping inherently multi-value types into file write
operation.  IOW, how would you write a value of type REG_MULTI_SZ?  By
forcing a separator (NUL?)?  By writing multiple strings using the append
function (i.e., "echo 'a' > val; echo 'b' >> val")?

We could make the type modifier optional (omitting it would default to the
current type for existing values and to, say, REG_SZ for new values).
Also, it might make sense to allow type change if O_TRUNC is set on open,
and disallow it otherwise...

> Using the separator in value names could be handled if it is encoded
> somehow, e.g: "foo%2cbar,sz".
> This would also be useful for current read access for value name
> containing slashes.

An orthogonal issue.  We may simply need to fix the "open" implementation
to be more precise in determining the key/value boundary, rather than
assuming the value starts at the last '/'.

> B) Same as above, but expose types in directory listing:
>
> $ ls /proc/registry/subkey
> sz_value,sz
> dword_value,dword

Here's YA alternative: a special pseudo-file that maps filenames to types.
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_	    pechtcha@cs.nyu.edu | igor@watson.ibm.com
ZZZzz /,`.-'`'    -.  ;-;;,_		Igor Peshansky, Ph.D. (name changed!)
     |,4-  ) )-,_. ,\ (  `'-'		old name: Igor Pechtchanski
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"Las! je suis sot... -Mais non, tu ne l'es pas, puisque tu t'en rends compte."
"But no -- you are no fool; you call yourself a fool, there's proof enough in
that!" -- Rostand, "Cyrano de Bergerac"


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]