mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] fixes for cdsymlinks.c
@ 2005-02-12  1:57 J.A. Magallon
  0 siblings, 0 replies; only message in thread
From: J.A. Magallon @ 2005-02-12  1:57 UTC (permalink / raw)
  To: Lista Linux-Kernel; +Cc: Greg KH

[-- Attachment #1: Type: text/plain, Size: 1802 bytes --]

Hi...

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

--- cdsymlinks.c.orig	2005-02-12 02:51:15.000000000 +0100
+++ cdsymlinks.c	2005-02-12 02:48:35.000000000 +0100
@@ -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


[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-02-12  1:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-02-12  1:57 [PATCH] fixes for cdsymlinks.c J.A. Magallon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®