|
From: <in...@us...> - 2002-08-26 01:07:39
|
Update of /cvsroot/mingw/msys/rt/src/winsup/cygwin
In directory usw-pr-cvs1:/tmp/cvs-serv2981
Modified Files:
ChangeLog.MSYS path.cc
Log Message:
2002-08-25 Luke Dunstan <in...@us...>
* path.cc (mount_info::read_mounts): Fix handling of spaces in
mount point paths. Allow DOS line endings in /etc/fstab.
Index: ChangeLog.MSYS
===================================================================
RCS file: /cvsroot/mingw/msys/rt/src/winsup/cygwin/ChangeLog.MSYS,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -d -r1.20 -r1.21
*** ChangeLog.MSYS 19 Jul 2002 16:13:25 -0000 1.20
--- ChangeLog.MSYS 26 Aug 2002 01:07:37 -0000 1.21
***************
*** 1,2 ****
--- 1,7 ----
+ 2002-08-25 Luke Dunstan <in...@us...>
+
+ * path.cc (mount_info::read_mounts): Fix handling of spaces in
+ mount point paths. Allow DOS line endings in /etc/fstab.
+
2002-07-19 Earnie Boyd <ea...@us...>
Index: path.cc
===================================================================
RCS file: /cvsroot/mingw/msys/rt/src/winsup/cygwin/path.cc,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** path.cc 17 Jul 2002 13:06:56 -0000 1.16
--- path.cc 26 Aug 2002 01:07:37 -0000 1.17
***************
*** 1722,1739 ****
st = strchr(pfstab, '\n');
if (st)
! *st = '\0';
if (! strlen (pfstab))
continue;
while ((st = strchr (pfstab, '\t')))
{
*st = ' ';
! };
st = strchr (pfstab, ' ');
*st++ = '\0';
while (*st == ' ')
st++;
- sst = strrchr(st, ' ');
- while (sst && *sst == ' ')
- *sst-- = '\0';
debug_printf("fstab: native - %s, posix - %s", pfstab, st);
res = mount_table->add_item (pfstab, st, MOUNT_BINARY, FALSE);
--- 1722,1749 ----
st = strchr(pfstab, '\n');
if (st)
! {
! *st = '\0';
! // Strip carriage return.
! if (st > pfstab && *--st == '\r')
! *st = '\0';
! }
if (! strlen (pfstab))
continue;
+ // Replace tabs with spaces.
while ((st = strchr (pfstab, '\t')))
{
*st = ' ';
! }
! // Strip spaces at end of line.
! sst = strchr(pfstab, '\0');
! while (sst > pfstab && *--sst == ' ')
! *sst = '\0';
! // Find space separator.
st = strchr (pfstab, ' ');
+ if (!st)
+ continue;
*st++ = '\0';
while (*st == ' ')
st++;
debug_printf("fstab: native - %s, posix - %s", pfstab, st);
res = mount_table->add_item (pfstab, st, MOUNT_BINARY, FALSE);
|