aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2000-11-24 18:04:44 +0000
committerChristopher Faylor <me@cgf.cx>2000-11-24 18:04:44 +0000
commit93c1e56b2de5361368daf78644b9d63bfee419ce (patch)
tree68c0e54f293eed64d279813a0a7c7db593062326
parent5e46e273281a9013e65d1b9d65856129461e1686 (diff)
downloadnewlib-93c1e56b2de5361368daf78644b9d63bfee419ce.zip
newlib-93c1e56b2de5361368daf78644b9d63bfee419ce.tar.gz
newlib-93c1e56b2de5361368daf78644b9d63bfee419ce.tar.bz2
* path.cc (mount_info::read_cygdrive_info_from_registry): Read system cygdrive
prefix with KEY_READ. (mount_info::get_cygdrive_info): Ditto.
-rw-r--r--winsup/cygwin/ChangeLog6
-rw-r--r--winsup/cygwin/path.cc28
2 files changed, 20 insertions, 14 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 5795af7..4920519 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -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>
* Makefile.in: new-temp.a -> new-templib.a
diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc
index a0f4ebd..836ba85 100644
--- a/winsup/cygwin/path.cc
+++ b/winsup/cygwin/path.cc
@@ -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 */
}
else if (deveq ("mem"))
- {
- devn = FH_MEM;
- unit = 1;
- }
+ {
+ devn = FH_MEM;
+ unit = 1;
+ }
else if (deveq ("clipboard"))
- devn = FH_CLIPBOARD;
+ devn = FH_CLIPBOARD;
else if (deveq ("port"))
- {
- devn = FH_MEM;
- unit = 4;
- }
+ {
+ devn = FH_MEM;
+ unit = 4;
+ }
else if (deveqn ("com", 3) && (unit = digits (name + 3)) >= 0)
devn = FH_SERIAL;
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');
if (*src == '.')
- {
+ {
if (dst == dst_start + 1 && *dst_start == '/')
--dst;
goto sawdot;
- }
+ }
if (dst > dst_start && !isslash (dst[-1]))
*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. */
/* 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_CYGWIN_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. */
- 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_CYGWIN_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;
debug_printf("cygheap->root: %s, posix: %s",
- (const char *) cygheap->root.path (), posix);
+ (const char *) cygheap->root.path (), posix);
if (strlen (tocopy) >= ulen)
{
set_errno (ERANGE);