[LLVMdev] LNT ClamAV - Sorting output

Török Edwin edwin+ml-debian at etorok.net
Tue Apr 2 13:20:49 PDT 2013


On 04/02/2013 11:06 PM, Daniel Dunbar wrote:
> On Tue, Apr 2, 2013 at 11:46 AM, Renato Golin <renato.golin at linaro.org <mailto:renato.golin at linaro.org>> wrote:
> 
>     On 2 April 2013 19:20, Daniel Dunbar <daniel at zuster.org <mailto:daniel at zuster.org>> wrote:
> 
>         What is it that makes the output of the program asynchronous? The output is deterministic on Darwin, so it seems like it should be possible to make it more stable. 
> 
> 
>     This is a virus scan and, AFAICS, depends on the order in which the INODEs are laid out in the directory. I'm not sure there is a way to sort the files before, I'll look into that.
> 
> 
> Ok, that seems ideal if possible.

You can pass all the filenames from the inputs/ directory directly on the command-line, instead of specifying -r inputs/.
That way the order of scanning will be exactly the one specified on the command-line.

Otherwise clamscan just does a readdir, so the order is entirely FS-dependent, similarly with clamd which does a sort by inode.

> 
> Looping in  Edvin who wrote Clamscan. :)

Thats an overstatement, although I wrote a fair amount of libclamav :)

Best regards,
--Edwin



More information about the llvm-dev mailing list