LFS 6.8: Error in 6.46 IPRoute
bruce.dubbs at gmail.com
Fri Mar 25 16:30:17 PDT 2011
> I think there may be a problem with this chapter.
> $ sed -i '1289i\\tfilter.cloned = 2;' ip/iproute.c
> The instruction ^ in the chapter, changes the file.
> the actual change to the file was:
> tfilter.cloned = 2;
> which caused this error:
> iproute.c: In function 'iproute_list_flush_or_save':
> iproute.c:1289:1: error: 'tfilter' undeclared (first use in this function)
> iproute.c:1289:1: note: each undeclared identifier is reported only
> once for each function it appears in
> I believe the expected change is:
> filter.cloned = 2;
> if I change the sed command to include a new line between the
> backslashes it works as expected.
> $ sed -i '1289i\
>> \tfilter.cloned = 2;' ip/iproute.c
I think you omitted a backslash when you ran the command. The \\ is an
escaped backslash so that sed uses \t or tab. Make sure you used single
quotes and not double quotes. That also could have caused the error.
More information about the lfs-support