change log for rtems (2010-12-28)

rtems-vc at rtems.org rtems-vc at rtems.org
Tue Dec 28 09:10:30 UTC 2010


 *sh*:
2010-12-28	Sebastian Huber <sebastian.huber at embedded-brains.de>

	* libfs/src/dosfs/msdos_misc.c: Create short file names acceptable for
	Windows.

M 1.2668  cpukit/ChangeLog
M   1.26  cpukit/libfs/src/dosfs/msdos_misc.c

diff -u rtems/cpukit/ChangeLog:1.2667 rtems/cpukit/ChangeLog:1.2668
--- rtems/cpukit/ChangeLog:1.2667	Mon Dec 27 08:35:12 2010
+++ rtems/cpukit/ChangeLog	Tue Dec 28 02:46:57 2010
@@ -1,3 +1,8 @@
+2010-12-28	Sebastian Huber <sebastian.huber at embedded-brains.de>
+
+	* libfs/src/dosfs/msdos_misc.c: Create short file names acceptable for
+	Windows.
+
 2010-12-27	Sebastian Huber <sebastian.huber at embedded-brains.de>
 
 	* libfs/src/dosfs/msdos.h, libfs/src/dosfs/msdos_misc.c,

diff -u rtems/cpukit/libfs/src/dosfs/msdos_misc.c:1.25 rtems/cpukit/libfs/src/dosfs/msdos_misc.c:1.26
--- rtems/cpukit/libfs/src/dosfs/msdos_misc.c:1.25	Mon Dec 27 08:35:13 2010
+++ rtems/cpukit/libfs/src/dosfs/msdos_misc.c	Tue Dec 28 02:46:57 2010
@@ -92,12 +92,13 @@
     static const char* hex = "0123456789ABCDEF";
     char* c = MSDOS_DIR_NAME(sfn);
     int   i;
-    for (i = 0; i < 3; i++, c++)
+    for (i = 0; i < 2; i++, c++)
       if ((*c == ' ') || (*c == '.'))
-        *c = '~';
-    *c++ = '~';
+        *c = '_';
     for (i = 0; i < 4; i++, c++)
       *c = hex[(num >> ((3 - i) * 4)) & 0xf];
+    *c++ = '~';
+    *c++ = '1';
 }
 
 /* msdos_name_type --
@@ -1535,6 +1536,7 @@
             char*       p;
             const char* n;
             int         i;
+            char        fill = 0;
 
             length += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE;
             lfn_entry++;
@@ -1600,9 +1602,17 @@
 
             for (i = 0; i < MSDOS_LFN_LEN_PER_ENTRY; i++)
             {
-                *p = *n;
                 if (*n != 0)
+                {
+                    *p = *n;
                     n++;
+                }
+                else
+                {
+                    p [0] = fill;
+                    p [1] = fill;
+                    fill = 0xff;
+                }
 
                 switch (i)
                 {



--

Generated by Deluxe Loginfo [http://www.codewiz.org/projects/index.html#loginfo] 2.122 by Bernardo Innocenti <bernie at develer.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/vc/attachments/20101228/87069572/attachment.html>


More information about the vc mailing list