History log of /xv6-public/grep.c (Results 1 – 3 of 3)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: xv6-rev11, xv6-rev9
# 7894fcd2 25-Aug-2016 Frans Kaashoek <kaashoek@mit.edu>

Remove trailing white space with:
for f in *.{h,c}; do sed -i .sed 's/[[:blank:]]*$//' $f; done
(Thanks to Nicolás Wolovick)


# 7443b964 25-Mar-2015 Austin Clements <amdragon@mit.edu>

Fix missing NUL-terminator in grep

Currently, grep read()s into a buffer and then uses the buffer as a
string. Since there's no NUL-terminator, this can cause it to falsely
identify line breaks and

Fix missing NUL-terminator in grep

Currently, grep read()s into a buffer and then uses the buffer as a
string. Since there's no NUL-terminator, this can cause it to falsely
identify line breaks and matches from leftover data on earlier lines
and, if a line fills up the entire buffer, to read past the end of the
buffer.

Fix this by NUL-terminating any data returned by read().

Thanks to Keiichi Watanabe for the report.

show more ...


Revision tags: xv6-rev8, xv6-rev7, osdi12-submit, xv6-rev6, xv6-rev5, xv6-2010, xv6-rev4, xv6-rev3, xv6-2008, xv6-2007, xv6-rev1
# 1a89baa7 28-Aug-2007 rsc <rsc>

add grep; add lost echo