Karl Goetz schreef:
The code to modify the b43 related bug is commented out. I got help
writing the sed line, and I have NFI what it does. I'm not putting it
in without understanding.

Sed FAQ [1] 4.13 sheds some light on that. In pseudocode:

for each input line
  buffer = input line
  :more
  if not last line
    buffer += next line
  // string to be replaced consists of 3 lines
  if buffer contains 3 lines (or: 2 end-lines)
    goto enough
  goto more
  :enough
  buffer.replace(b43err..., See http...)
  print buffer
  delete buffer

Or in plain words: get 3 consecutive lines, check if it's the string you want to replace and replace if it is.

But the patch as it is now (if uncommented) won't work. First of all, it doesn't provide input for sed. This will make it wait for input. You probably want:

 sed -i '/CONFIG_VIDEO_CX23885/d' ./drivers/media/video/Makefile
+
+# Stop b43 ...
+sed -i ':more...' ./drivers/net/wireless/b43/main.c
+
+# Remove ...
+...
cd ..

Secondly, the search string as it is now doesn't take the whitespace in the code into account. I think that it should be something like:

s|.*b43err...to "\n.*"http...firmware "\n.*and..\\n");|See...|;

[1] http://www.faqs.org/faqs/editor-faq/sed/


_______________________________________________
gNewSense-dev mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/gnewsense-dev

Reply via email to