[PATCH] tools: escape double quotes in company names

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Double quotes in company names are properly escaped so that they are
valid C string literals.
---
 tools/parse_companies.pl | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/parse_companies.pl b/tools/parse_companies.pl
index f755390..99d3f31 100755
--- a/tools/parse_companies.pl
+++ b/tools/parse_companies.pl
@@ -51,6 +51,7 @@ while (<>) {
         my $name = uri_decode($1);
         $name =~ s/^\s+//g; # kill leading
         $name =~ s/\s+$//g; # and trailing space
+        $name =~ s/"/\\"/g; # escape double quotes
         my $id = hex($identifier);
         if ($id != 65535) {
             print "\tcase $id:\n";
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux