]> sourceware.org Git - newlib-cygwin.git/commitdiff
* path.cc (symlink_info::check): Use new introducer for mknod'ed files.
authorChristopher Faylor <me@cgf.cx>
Sat, 27 Sep 2003 05:44:58 +0000 (05:44 +0000)
committerChristopher Faylor <me@cgf.cx>
Sat, 27 Sep 2003 05:44:58 +0000 (05:44 +0000)
(parse_device): Ditto.
* syscalls.cc (mknod_worker): Ditto.

winsup/cygwin/ChangeLog
winsup/cygwin/path.cc
winsup/cygwin/syscalls.cc

index 17fb663344deb7d6034ed00add35e8064c1488b1..6f09fbd08c94d922aee02bf27a8f335def9247f6 100644 (file)
@@ -1,3 +1,9 @@
+2003-09-27  Christopher Faylor  <cgf@redhat.com>
+
+       * path.cc (symlink_info::check): Use new introducer for mknod'ed files.
+       (parse_device): Ditto.
+       * syscalls.cc (mknod_worker): Ditto.
+
 2003-09-27  Christopher Faylor  <cgf@redhat.com>
 
        * devices.shilka: Add /dev/sda disk devices.
index d1e31ad9c8496928609590e776eff156688374f2..2416608855167bae0d0aabbb31881cdd148850b5 100644 (file)
@@ -2880,7 +2880,7 @@ symlink_info::parse_device (const char *contents)
   _major_t myminor;
   _mode_t mymode;
 
-  mymajor = strtol (++contents, &endptr, 16);
+  mymajor = strtol (contents += 2, &endptr, 16);
   if (endptr == contents)
     return false;
 
@@ -3016,7 +3016,7 @@ symlink_info::check (char *path, const suffix_info *suffixes, unsigned opt)
          res = check_shortcut (suffix.path, fileattr, h, contents, &error, &pflags);
          if (!res)
            /* check more below */;
-         else if (*contents == ':' && parse_device (contents))
+         else if (contents[0] == ':' && contents[1] == '\\' && parse_device (contents))
            goto file_not_symlink;
          else
            break;
index 51ce08e2ff8025e4552496ba9ed28fb7c53a8e6c..8c53af20e34b34fd45350d02651b1bc98dbc801a 100644 (file)
@@ -2033,8 +2033,8 @@ static int __stdcall
 mknod_worker (const char *path, mode_t type, mode_t mode, _major_t major,
              _minor_t minor)
 {
-  char buf[sizeof (":00000000:00000000:00000000") + MAX_PATH];
-  sprintf (buf, ":%x:%x:%x", major, minor,
+  char buf[sizeof (":\\00000000:00000000:00000000") + MAX_PATH];
+  sprintf (buf, ":\\%x:%x:%x", major, minor,
           type | (mode & (S_IRWXU | S_IRWXG | S_IRWXO)));
   return symlink_worker (buf, path, true, true);
 }
This page took 0.042953 seconds and 5 git commands to generate.