Re: [patch] -H flag for grep.

2011-02-21 Thread Fred Crowson

On 02/21/11 15:54, Alexander Schrijver wrote:

On Mon, Feb 21, 2011 at 01:34:51PM +0100, Pascal Stumpf wrote:

Implement a -H flag for grep, useful for combining e.g. find and grep.


-o used to do this but has been removed. (See the commit logs for the reason, i
forgot it)

grep(1) only prints the filename when it receives more then 1 filename as
arguments. Thus, when you do this:

$ find . -name '*.c' -exec grep bla {} \;

It doesn't print the filename.

But when you use xargs(1), like Bret suggests it does.



$ find . -name *.php -exec grep blah {} \; -print

Will print the file name after the line that grep matches.

hth

Fred



typos in #ifdef DEBUG

2010-07-13 Thread Fred Crowson

Hi tech@

While building a kernel with option DEBUG to try to hunt down my issue 
with the Libretto 70CT (PR 6052) I came across the following typos which 
prevented the build:


sys/arch/i386/i386/trap.c

--- trap.c  Wed Jul 14 00:55:31 2010
+++ mytrap.cWed Jul 14 00:44:26 2010
@@ -173,7 +173,7 @@
 #ifdef DEBUG
if (trapdebug) {
printf(trap %d code %x eip %x cs %x eflags %x cr2 %x 
cpl %x\n,

-   frame-tf_trapno, frame-tf_err, frame.-f_eip,
+   frame-tf_trapno, frame-tf_err, frame-tf_eip,
frame-tf_cs, frame-tf_eflags, rcr2(), lapic_tpr);
printf(curproc %p\n, curproc);
}

and in sys/kern/dma_alloc.c

--- dma_alloc.c Wed Jul 14 01:05:14 2010
+++ my_dma_alloc.c  Wed Jul 14 00:26:56 2010
@@ -49,7 +49,7 @@
if (sz = (1  (b + DMA_BUCKET_OFFSET)))
return (b);
 #ifdef DEBUG
-   printf(dma_alloc/free: object %d too large\n, sz)
+   printf(dma_alloc/free: object %d too large\n, sz);
 #endif
return (-1);
 }

Thanks

Fred