This is the mail archive of the cygwin-patches 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: [Patch] regtool: Add load/unload commands and --binary option


On Fri, 3 Mar 2006, Dave Korn wrote:

> On 03 March 2006 16:02, Igor Peshansky wrote:
>
> >> I'm not quite sure how to handle the mapping from file types to
> >> registry key types, but there might be some simple way which I'm just
> >> too blind to see.
> >
> > Hmm, there is currently no way for the programs to find out the
> > registry key type, unless we introduce new functionality into stat()
> > or something.
> >
> > As it is, why would the programs need to know the key type, anyway?
>
>   Because they aren't writing it for their own benefit, but in order for
> it to be read by some other app that requires it to be of a specific
> type.
>
> > They just write the data, and fhandler_registry takes care of
> > converting it to the right format (using arbirtary conventions of some
> > sort).  The only potential problems are REG_MULTI_SZ and REG_EXPAND_SZ
> > (in the former case it's a question of picking a string delimiter, and
> > in the latter it's about annotating expandable values).
> >
> > Am I missing something?
>
>   You're thinking of the registry as some place where a program puts its
> own private data and reads it back and therefore assuming that it
> doesn't matter what actually is /in/ the registry as long as the program
> gets back the exact same stuff it put in there, but sometimes programs
> want to alter or set registry values for external apps that require a
> specific type.  If cygwin chose a type and didn't provide a way to
> specify, this feature would be of much more limited use as you couldn't
> use it to modify an existing value because cygwin might decide to write
> it back as a different type and break whatever-it-was that depended on
> it.

Actually, I did think of registry as shared data, but I also assumed that
the creation of value files would be separate from writing to them, and
that the actual writing would not change the type.

That still might not be a bad approach -- maybe introduce extra,
registry-specific, flags for open() that reflect the file (i.e, key) type,
and then implement writes to the files based on those flags...  Just
another alternative to consider...
	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]