* path.cc (mount_info::read_cygdrive_info_from_registry): Read system cygdrive
prefix with KEY_READ. (mount_info::get_cygdrive_info): Ditto.
This commit is contained in:
		| @@ -1,3 +1,9 @@ | |||||||
|  | Sat Nov 25 01:57:42 2000  Kazuhiro Fujieda  <fujieda@jaist.ac.jp> | ||||||
|  |  | ||||||
|  | 	* path.cc (mount_info::read_cygdrive_info_from_registry): Read system | ||||||
|  | 	cygdrive prefix with KEY_READ. | ||||||
|  | 	(mount_info::get_cygdrive_info): Ditto. | ||||||
|  |  | ||||||
| Wed Nov 22 11:18:02 2000  Christopher Faylor <cgf@cygnus.com> | Wed Nov 22 11:18:02 2000  Christopher Faylor <cgf@cygnus.com> | ||||||
|  |  | ||||||
| 	* Makefile.in: new-temp.a -> new-templib.a | 	* Makefile.in: new-temp.a -> new-templib.a | ||||||
|   | |||||||
| @@ -522,17 +522,17 @@ get_device_number (const char *name, int &unit, BOOL from_conv) | |||||||
| 	  unit = 8 + (deveqn ("u", 1) ? 1 : 0); /* Keep unit Linux conformant */ | 	  unit = 8 + (deveqn ("u", 1) ? 1 : 0); /* Keep unit Linux conformant */ | ||||||
| 	} | 	} | ||||||
|       else if (deveq ("mem")) |       else if (deveq ("mem")) | ||||||
|         { | 	{ | ||||||
|           devn = FH_MEM; | 	  devn = FH_MEM; | ||||||
|           unit = 1; | 	  unit = 1; | ||||||
|         } | 	} | ||||||
|       else if (deveq ("clipboard")) |       else if (deveq ("clipboard")) | ||||||
|         devn = FH_CLIPBOARD; | 	devn = FH_CLIPBOARD; | ||||||
|       else if (deveq ("port")) |       else if (deveq ("port")) | ||||||
|         { | 	{ | ||||||
|           devn = FH_MEM; | 	  devn = FH_MEM; | ||||||
|           unit = 4; | 	  unit = 4; | ||||||
|         } | 	} | ||||||
|       else if (deveqn ("com", 3) && (unit = digits (name + 3)) >= 0) |       else if (deveqn ("com", 3) && (unit = digits (name + 3)) >= 0) | ||||||
| 	devn = FH_SERIAL; | 	devn = FH_SERIAL; | ||||||
|       else if (deveqn ("ttyS", 4) && (unit = digits (name + 4)) >= 0) |       else if (deveqn ("ttyS", 4) && (unit = digits (name + 4)) >= 0) | ||||||
| @@ -609,11 +609,11 @@ normalize_posix_path (const char *src, char *dst) | |||||||
| 	} | 	} | ||||||
|       dst = strchr (dst, '\0'); |       dst = strchr (dst, '\0'); | ||||||
|       if (*src == '.') |       if (*src == '.') | ||||||
|         { | 	{ | ||||||
| 	  if (dst == dst_start + 1 && *dst_start == '/') | 	  if (dst == dst_start + 1 && *dst_start == '/') | ||||||
| 	     --dst; | 	     --dst; | ||||||
| 	  goto sawdot; | 	  goto sawdot; | ||||||
|         } | 	} | ||||||
|       if (dst > dst_start && !isslash (dst[-1])) |       if (dst > dst_start && !isslash (dst[-1])) | ||||||
| 	*dst++ = '/'; | 	*dst++ = '/'; | ||||||
|     } |     } | ||||||
| @@ -1517,7 +1517,7 @@ mount_info::read_cygdrive_info_from_registry () | |||||||
|       /* Didn't find the user path prefix so check the system path prefix. */ |       /* Didn't find the user path prefix so check the system path prefix. */ | ||||||
|  |  | ||||||
|       /* reg_key for system path prefix in HKEY_LOCAL_MACHINE.  */ |       /* reg_key for system path prefix in HKEY_LOCAL_MACHINE.  */ | ||||||
|       reg_key r2 (HKEY_LOCAL_MACHINE, KEY_ALL_ACCESS, "SOFTWARE", |       reg_key r2 (HKEY_LOCAL_MACHINE, KEY_READ, "SOFTWARE", | ||||||
| 		 CYGWIN_INFO_CYGNUS_REGISTRY_NAME, | 		 CYGWIN_INFO_CYGNUS_REGISTRY_NAME, | ||||||
| 		 CYGWIN_INFO_CYGWIN_REGISTRY_NAME, | 		 CYGWIN_INFO_CYGWIN_REGISTRY_NAME, | ||||||
| 		 CYGWIN_INFO_CYGWIN_MOUNT_REGISTRY_NAME, | 		 CYGWIN_INFO_CYGWIN_MOUNT_REGISTRY_NAME, | ||||||
| @@ -1647,7 +1647,7 @@ mount_info::get_cygdrive_info (char *user, char *system, char* user_flags, | |||||||
|     } |     } | ||||||
|  |  | ||||||
|   /* Get the system path prefix from HKEY_LOCAL_MACHINE. */ |   /* Get the system path prefix from HKEY_LOCAL_MACHINE. */ | ||||||
|   reg_key r2 (HKEY_LOCAL_MACHINE, KEY_ALL_ACCESS, "SOFTWARE", |   reg_key r2 (HKEY_LOCAL_MACHINE, KEY_READ, "SOFTWARE", | ||||||
| 	      CYGWIN_INFO_CYGNUS_REGISTRY_NAME, | 	      CYGWIN_INFO_CYGNUS_REGISTRY_NAME, | ||||||
| 	      CYGWIN_INFO_CYGWIN_REGISTRY_NAME, | 	      CYGWIN_INFO_CYGWIN_REGISTRY_NAME, | ||||||
| 	      CYGWIN_INFO_CYGWIN_MOUNT_REGISTRY_NAME, | 	      CYGWIN_INFO_CYGWIN_MOUNT_REGISTRY_NAME, | ||||||
| @@ -2947,7 +2947,7 @@ cwdstuff::get (char *buf, int need_posix, int with_chroot, unsigned ulen) | |||||||
| 	     posix + cygheap->root.length () : posix; | 	     posix + cygheap->root.length () : posix; | ||||||
|  |  | ||||||
|   debug_printf("cygheap->root: %s, posix: %s", |   debug_printf("cygheap->root: %s, posix: %s", | ||||||
|   	       (const char *) cygheap->root.path (), posix); | 	       (const char *) cygheap->root.path (), posix); | ||||||
|   if (strlen (tocopy) >= ulen) |   if (strlen (tocopy) >= ulen) | ||||||
|     { |     { | ||||||
|       set_errno (ERANGE); |       set_errno (ERANGE); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user