description of my most recent patch
Chris Brannon
cmbrannon at cox.net
Thu May 28 01:47:36 EDT 2009
Several days ago, I fixed the issue where trailing blank lines were being
added to files under
/sys/module/speakup/parameters/. In the process of testing that patch,
I found a second issue. The easiest way to describe it is to describe
the steps for reproducing it. From the shell, do the following.
cd /sys/module/speakup/parameters
cp caps_start /tmp/test
cat caps_start # Look closely.
cp /tmp/test caps_start
cat caps_start # Look again; it changed!
What are the extra quote marks and the \x0a doing in that second file?
When you read the files caps_start or caps_stop, Speakup surrounds the data with
quotation marks. There is one newline character following the closing quote.
Looks nice. Unfortunately, when you write a value to caps_start or caps_stop,
Speakup doesn't discard the quotes or the newline.
When you read the file a second time, the newline is escaped with \x0a,
and the value is surrounded by a second pair of quotes.
The solution is to simply discard the newline and surrounding quotes from
the data in caps_start and caps_stop.
So that's what the last patch does.
Ok, so why does anyone care? I think this fixes all of the issues with
speakupconf. The script should work fine now.
-- Chris
More information about the Speakup
mailing list