From 20f9af53481ba97c6759e2febe449428618936ad Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Thu, 19 Oct 2006 10:01:03 +0000 Subject: * fhandler.h (fhandler_base::set_name): Make virtual. (class fhandler_registry): Add wow64 and prefix_len members. Declare set_name method. * fhandler_proc.cc (PROC_REGISTRY32): Define. (PROC_REGISTRY64): Define. (proc_listing): Add "registry32" and "registry64" elements. (proc_fhandlers): Add corresponding FH_REGISTRY values. * fhandler_registry.cc (registry_len): Drop static value in favor of class member prefix_len. Use preifx_len instead of registry_len throughout. (fhandler_registry::set_name): Define. Set wow64 and prefix_len according to directory prefix. (fhandler_registry::fhandler_registry): Set wow64 and prefix_len to default values. (open_key): Add wow64 argument. Handle wow64 in call to RegOpenKeyEx. Use fhandler_registry member wow64 in this place throughout. --- winsup/cygwin/fhandler_proc.cc | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) (limited to 'winsup/cygwin/fhandler_proc.cc') diff --git a/winsup/cygwin/fhandler_proc.cc b/winsup/cygwin/fhandler_proc.cc index dd706743d..e1bc4d1f3 100644 --- a/winsup/cygwin/fhandler_proc.cc +++ b/winsup/cygwin/fhandler_proc.cc @@ -33,15 +33,17 @@ details. */ #include /* offsets in proc_listing */ -static const int PROC_LOADAVG = 2; // /proc/loadavg -static const int PROC_MEMINFO = 3; // /proc/meminfo -static const int PROC_REGISTRY = 4; // /proc/registry -static const int PROC_STAT = 5; // /proc/stat -static const int PROC_VERSION = 6; // /proc/version -static const int PROC_UPTIME = 7; // /proc/uptime -static const int PROC_CPUINFO = 8; // /proc/cpuinfo -static const int PROC_PARTITIONS = 9; // /proc/partitions -static const int PROC_SELF = 10; // /proc/self +static const int PROC_LOADAVG = 2; // /proc/loadavg +static const int PROC_MEMINFO = 3; // /proc/meminfo +static const int PROC_REGISTRY = 4; // /proc/registry +static const int PROC_STAT = 5; // /proc/stat +static const int PROC_VERSION = 6; // /proc/version +static const int PROC_UPTIME = 7; // /proc/uptime +static const int PROC_CPUINFO = 8; // /proc/cpuinfo +static const int PROC_PARTITIONS = 9; // /proc/partitions +static const int PROC_SELF = 10; // /proc/self +static const int PROC_REGISTRY32 = 11; // /proc/registry32 +static const int PROC_REGISTRY64 = 12; // /proc/registry64 /* names of objects in /proc */ static const char *proc_listing[] = { @@ -56,6 +58,8 @@ static const char *proc_listing[] = { "cpuinfo", "partitions", "self", + "registry32", + "registry64", NULL }; @@ -76,6 +80,8 @@ static const DWORD proc_fhandlers[PROC_LINK_COUNT] = { FH_PROC, FH_PROC, FH_PROC, + FH_REGISTRY, + FH_REGISTRY, }; /* name of the /proc filesystem */ -- cgit v1.2.3