git-svn-id: file:///var/lib/svn/clamav-devel/trunk/clamav-devel@2616 77e5149b-7576-45b1-b177-96237e5ba77b
Tomasz Kojm authored on 2007/01/13 09:02:54... | ... |
@@ -55,7 +55,7 @@ int main(int argc, char **argv) |
55 | 55 |
char *clamdscan_accepted[] = { "help", "version", "verbose", "quiet", |
56 | 56 |
"stdout", "log", "move", "copy", "remove", |
57 | 57 |
"config-file", "no-summary", |
58 |
- "disable-summary", NULL }; |
|
58 |
+ "disable-summary", "multiscan", NULL }; |
|
59 | 59 |
|
60 | 60 |
|
61 | 61 |
opt = opt_parse(argc, argv, clamscan_shortopt, clamscan_longopt, clamdscan_accepted); |
... | ... |
@@ -151,7 +151,8 @@ void help(void) |
151 | 151 |
mprintf(" --move=DIRECTORY Move infected files into DIRECTORY\n"); |
152 | 152 |
mprintf(" --copy=DIRECTORY Copy infected files into DIRECTORY\n"); |
153 | 153 |
mprintf(" --config-file=FILE Read configuration from FILE.\n"); |
154 |
- mprintf(" --infected -i Only print infected files\n"); |
|
154 |
+ mprintf(" --multiscan -m Force MULTISCAN mode\n"); |
|
155 |
+ mprintf(" --infected -i Only print infected files\n"); |
|
155 | 156 |
mprintf(" --no-summary Disable summary at end of scanning\n"); |
156 | 157 |
mprintf("\n"); |
157 | 158 |
|
... | ... |
@@ -411,6 +411,9 @@ int client(const struct optstruct *opt, int *infected) |
411 | 411 |
|
412 | 412 |
*infected = 0; |
413 | 413 |
|
414 |
+ if(ncore || opt_check(opt, "multiscan")) |
|
415 |
+ scantype = "MULTISCAN"; |
|
416 |
+ |
|
414 | 417 |
/* parse argument list */ |
415 | 418 |
if(opt->filename == NULL || strlen(opt->filename) == 0) { |
416 | 419 |
/* scan current directory */ |
... | ... |
@@ -422,12 +425,6 @@ int client(const struct optstruct *opt, int *infected) |
422 | 422 |
if((sockd = dconnect(opt)) < 0) |
423 | 423 |
return 2; |
424 | 424 |
|
425 |
- /* TODO: add a cmdline option to allow using MULTISCAN on systems |
|
426 |
- * without hardware accelerators (but with multiple CPUs) |
|
427 |
- */ |
|
428 |
- if(ncore) |
|
429 |
- scantype = "MULTISCAN"; |
|
430 |
- |
|
431 | 425 |
if((ret = dsfile(sockd, scantype, cwd, opt)) >= 0) |
432 | 426 |
*infected += ret; |
433 | 427 |
else |
... | ... |
@@ -486,9 +483,6 @@ int client(const struct optstruct *opt, int *infected) |
486 | 486 |
if((sockd = dconnect(opt)) < 0) |
487 | 487 |
return 2; |
488 | 488 |
|
489 |
- if(ncore) |
|
490 |
- scantype = "MULTISCAN"; |
|
491 |
- |
|
492 | 489 |
if((ret = dsfile(sockd, scantype, fullpath, opt)) >= 0) |
493 | 490 |
*infected += ret; |
494 | 491 |
else |
... | ... |
@@ -34,6 +34,9 @@ Read clamd settings from FILE. |
34 | 34 |
\fB\-l FILE, \-\-log=FILE\fR |
35 | 35 |
Save the scan report to FILE. |
36 | 36 |
.TP |
37 |
+\fB\-m, \-\-multiscan\fR |
|
38 |
+Always use MULTISCAN instead of CONTSCAN. |
|
39 |
+.TP |
|
37 | 40 |
\fB\-\-remove\fR |
38 | 41 |
Remove infected files. \fBBe careful.\fR |
39 | 42 |
.TP |