lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100321110758.GL5331@bicker>
Date:	Sun, 21 Mar 2010 14:07:58 +0300
From:	Dan Carpenter <error27@...il.com>
To:	Lars Lindley <lindley@...ote.org>, gregkh@...e.de, greg@...ah.com,
	penberg@...helsinki.fi, pavel@....cz, harvey.harrison@...il.com,
	devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org
Subject: Re: strip_whitespace.pl

On Sun, Mar 21, 2010 at 01:55:42PM +0300, Dan Carpenter wrote:
> I've written a new script called strip_whitespace.pl (included).
> 
> One bug is that, if you split or unsplit a string literal that
> confuses it.  Otherwise it seems to work.
> 
> strip_whitespace.pl drivers/staging/winbond/reg.c > before
> apply patch
> strip_whitespace.pl drivers/staging/winbond/reg.c > after
> 
> `diff before after`.  If they are the same then resend the patch.

On further reflection your new patch looks fine, if you combine the two.  
But next time could you use my script?

Acked-by:  Dan Carpenter <error27@...il.com>

regards,
dan carpenter

> 
> regards,
> dan carpenter
> 
> #!/usr/bin/perl
> 
> use strict;
> 
> my $file = shift();
> open FILE, "<$file";
> my $txt = do { local $/;  <FILE> };
> 
> # strip C99 comments
> $txt =~ s/\/\/.*//g;
> # strip newlines
> $txt =~ s/\n//g;
> # strip remaining comments
> $txt =~ s/\/\*.*?\*\///g;
> # strip tabs
> $txt =~ s/\t//g;
> # strip spaces
> $txt =~ s/ //g;
> # add newlines again
> $txt =~ s/;/;\n/g;
> 
> print "$txt\n";
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ