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]
Date:   Tue, 8 May 2018 21:05:05 +0200
From:   Andrea Parri <andrea.parri@...rulasolutions.com>
To:     Mauro Carvalho Chehab <mchehab+samsung@...nel.org>
Cc:     Jani Nikula <jani.nikula@...ux.intel.com>,
        Linux Doc Mailing List <linux-doc@...r.kernel.org>,
        linux-kernel@...r.kernel.org, Jonathan Corbet <corbet@....net>,
        Alan Stern <stern@...land.harvard.edu>,
        Andrea Parri <parri.andrea@...il.com>,
        Will Deacon <will.deacon@....com>,
        Peter Zijlstra <peterz@...radead.org>,
        Boqun Feng <boqun.feng@...il.com>,
        Nicholas Piggin <npiggin@...il.com>,
        David Howells <dhowells@...hat.com>,
        Jade Alglave <j.alglave@....ac.uk>,
        Luc Maranget <luc.maranget@...ia.fr>,
        "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
        Akira Yokosawa <akiyks@...il.com>,
        Matthew Wilcox <mawilcox@...rosoft.com>,
        Jeff Layton <jlayton@...hat.com>,
        Randy Dunlap <rdunlap@...radead.org>,
        Elena Reshetova <elena.reshetova@...el.com>,
        "Tobin C. Harding" <me@...in.cc>
Subject: Re: [PATCH 05/18] docs: core-api: add cachetlb documentation

On Tue, May 08, 2018 at 03:28:51PM -0300, Mauro Carvalho Chehab wrote:
> Em Tue, 8 May 2018 15:05:07 -0300
> Mauro Carvalho Chehab <mchehab+samsung@...nel.org> escreveu:
> 
> > Em Tue, 08 May 2018 17:40:56 +0300
> > Jani Nikula <jani.nikula@...ux.intel.com> escreveu:

[...]

> > > Side note, there's scripts/documentation-file-ref-check to grep the
> > > kernel tree for things that look like file references to Documentation/*
> > > and complain if they don't exist.
> > > 
> > > I get about 350+ hits with that, patches welcome! ;)  
> > 
> > This small script fixes a bunch of such errors:
> > 
> > 	scripts/documentation-file-ref-check 2>broken_refs
> > 	for i in $(cat broken_refs|cut -d: -f 2|grep -v devicetree|sort|uniq|grep \\.txt); do
> > 	        rst=$(basename $i)
> > 	        rst=${rst/.txt/.rst}
> > 	        f=$(find . -name $rst)
> > 	        f=${f#./}
> > 	        if [ "$f" != "" ]; then
> > 	                echo "Replacing $i to $f"
> > 	                for j in $(git grep -l $i); do
> > 	                        sed "s@$i@$f@g" -i $j
> > 	                done
> > 	        fi
> > 	done
> 
> It follows an improvement to the above script that shows also what
> it didn't find as a ReST file, and the ones that have common names
> with multiple matches.
> 
> I guess we could integrate something like that at 
> scripts/documentation-file-ref-check, in order to allow auto-correcting
> renamed .txt files.

FWIW, this would be more than welcome with me; thank you,

  Andrea


> 
> Regards,
> Mauro
> 
> 
> #!/bin/bash
> 
> scripts/documentation-file-ref-check 2>broken_refs
> for i in $(cat broken_refs|cut -d: -f 2|grep -v devicetree|sort|uniq|grep \\.txt); do
>         rst=$(basename $i)
>         rst=${rst/.txt/.rst}
>         f=$(find . -name $rst)
> 
>         if [ "$f" == "" ]; then
>                 echo "ERROR: Didn't find a .rst replacement for $i"
>         elif [ "$(echo $f | grep ' ')" != "" ]; then
>                 echo "ERROR: Found multiple possible replacements for $i:"
>                 for j in $f; do
>                         echo "    $j"
>                 done
>         else
>                 echo "Replacing $i to $f"
>                 f=${f#./}
>                 for j in $(git grep -l $i); do
>                         sed "s@$i@$f@g" -i $j
>                 done
>         fi
> done
> 
> 
> Thanks,
> Mauro

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ