Skip to contentSkip to conversation

fixes for cdsymlinks.c

PATCH New J.A. Magallon 1 participant 1 message Feb 12, 2005

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fixes for cdsymlinks.c

Hi...

I needed this patch to get this working, I think they are obvious corrections:

cdsymlinks.c renamed from cdsymlinks.c.orig +5 -5
@@ -218,7 +218,7 @@
 list_assign_split (struct list_t *list, char *text)
 {
   char *token = strchr (text, ':');
-  token = strtok (token ? token + 1 : text, " \t");
+  token = strtok (token ? token + 1 : text, " \t\n");
   while (token)
   {
     list_prepend (list, token);
@@ -267,8 +267,8 @@
             list_delete (&allowed_output);
             list_assign_split (&allowed_output, p.we_wordv[0] + 7);
           }
-          else if (!strncmp (p.we_wordv[0], "NUMBERED_LINKS=", 14))
-            numbered_links = atoi (p.we_wordv[0] + 14);
+          else if (!strncmp (p.we_wordv[0], "NUMBERED_LINKS=", 15))
+            numbered_links = atoi (p.we_wordv[0] + 15);
           break;
 	}
 	/* fall through */
@@ -325,9 +325,9 @@
       list_assign_split (&cap_CDRW, text);
     else if (!strncasecmp (text, "Can write CD-R", 14))
       list_assign_split (&cap_CDR, text);
-    else if (!strncasecmp (text, "Can read MRW", 14))
+    else if (!strncasecmp (text, "Can read MRW", 12))
       list_assign_split (&cap_CDMRW, text);
-    else if (!strncasecmp (text, "Can write MRW", 14))
+    else if (!strncasecmp (text, "Can write MRW", 13))
       list_assign_split (&cap_CDWMRW, text);
   }
   if (!feof (info))

Hope this is correct and will be included in udev-054 ;)

TIA

--
J.A. Magallon <jamagallon()able!es> \ Software is like sex:
werewolf!able!es \ It's better when it's free
Mandrakelinux release 10.2 (Cooker) for i586
Linux 2.6.10-jam9 (gcc 3.4.3 (Mandrakelinux 10.2 3.4.3-3mdk)) #1