diff -Nru nALFS-1.2.4-original/src/handlers/unpack.c nALFS-1.2.4/src/handlers/unpack.c
old
|
new
|
|
40 | 40 | #include "nprint.h" |
41 | 41 | #include "parser.h" |
42 | 42 | #include "backend.h" |
| 43 | #include "options.h" |
43 | 44 | |
44 | 45 | |
45 | 46 | #define El_unpack_archive(el) alloc_trimmed_param_value("archive", el) |
… |
… |
|
191 | 192 | if (change_current_dir(destination)) |
192 | 193 | goto free_all_and_return; |
193 | 194 | |
194 | | alloc_element_digest(el, &digest, &digest_type); |
| 195 | if (!*opt_disable_digest) |
| 196 | alloc_element_digest(el, &digest, &digest_type); |
195 | 197 | |
196 | 198 | /* Check if archive exists. */ |
197 | 199 | if ((stat(archive, &file_stat))) { |
diff -Nru nALFS-1.2.4-original/src/init.c nALFS-1.2.4/src/init.c
old
|
new
|
|
304 | 304 | LONG_OPTION_VERSION, |
305 | 305 | LONG_OPTION_HELP, |
306 | 306 | LONG_OPTION_GENERATE_STAMP, |
| 307 | LONG_OPTION_DISABLE_DIGEST, |
307 | 308 | LONG_OPTION_RCFILE, |
308 | 309 | }; |
309 | 310 | |
… |
… |
|
358 | 359 | " -p, --prune <dirs> Ignore <dirs> (separated with spaces) when\n" |
359 | 360 | " logging files.\n" |
360 | 361 | " -S, --generate-stamp Toggle stamp mode.\n" |
| 362 | " -d, --disable-digest Disable digest checking\n" |
361 | 363 | " --rcfile <file> Use <file> as configuration file.\n" |
362 | 364 | " -v, --verbose Toggle verbosity (%s).\n" |
363 | 365 | " --version Display program's version.\n" |
… |
… |
|
417 | 419 | {"help", no_argument, NULL, LONG_OPTION_HELP}, |
418 | 420 | |
419 | 421 | {"generate-stamp", no_argument, NULL, LONG_OPTION_GENERATE_STAMP}, |
| 422 | |
| 423 | {"disable-digest", no_argument, NULL, LONG_OPTION_DISABLE_DIGEST}, |
420 | 424 | |
421 | 425 | {"rcfile", required_argument, NULL, LONG_OPTION_RCFILE}, |
422 | 426 | |
… |
… |
|
425 | 429 | }; |
426 | 430 | |
427 | 431 | |
428 | | while ((i = getopt_long(*argc, *argv, "lPfhisBSL:b:p:v", long_opts, NULL)) != -1) { |
| 432 | while ((i = getopt_long(*argc, *argv, "lPfhisBSdL:b:p:v", long_opts, NULL)) != -1) { |
429 | 433 | switch (i) { |
430 | 434 | case LONG_OPTION_DISPLAY_ALFS: |
431 | 435 | Toggle(*opt_display_alfs); |
… |
… |
|
491 | 495 | Toggle(*opt_stamp_packages); |
492 | 496 | break; |
493 | 497 | |
| 498 | case 'd': |
| 499 | case LONG_OPTION_DISABLE_DIGEST: |
| 500 | Toggle(*opt_disable_digest); |
| 501 | break; |
| 502 | |
494 | 503 | case LONG_OPTION_RCFILE: |
495 | 504 | parse_rc_file(optarg); |
496 | 505 | break; |
diff -Nru nALFS-1.2.4-original/src/nalfs.c nALFS-1.2.4/src/nalfs.c
old
|
new
|
|
1888 | 1888 | } |
1889 | 1889 | #endif |
1890 | 1890 | |
| 1891 | static INLINE void toggle_disable_digest(void) |
| 1892 | { |
| 1893 | if (*opt_disable_digest) { |
| 1894 | Nprint("Digest checking now enabled."); |
| 1895 | *opt_disable_digest = 0; |
| 1896 | } else { |
| 1897 | Nprint("Digest checking now disabled."); |
| 1898 | *opt_disable_digest = 1; |
| 1899 | } |
| 1900 | } |
| 1901 | |
1891 | 1902 | static INLINE void toggle_system_output(void) |
1892 | 1903 | { |
1893 | 1904 | if (Backend_exists) { |
diff -Nru nALFS-1.2.4-original/src/option-array.h nALFS-1.2.4/src/option-array.h
old
|
new
|
|
57 | 57 | &real_opt_log_handlers, |
58 | 58 | &real_opt_log_backend, |
59 | 59 | &real_opt_stamp_packages, |
| 60 | &real_opt_disable_digest, |
60 | 61 | &real_opt_display_stage_header, |
61 | 62 | &real_opt_warn_if_set, |
62 | 63 | &real_opt_follow_running, |
diff -Nru nALFS-1.2.4-original/src/options.h nALFS-1.2.4/src/options.h
old
|
new
|
|
58 | 58 | BOOL_OPTION(log_backend, 1, NULL, NULL); |
59 | 59 | BOOL_OPTION(stamp_packages, 0, NULL, NULL); |
60 | 60 | STRING_OPTION(stamp_directory, "stamps", NULL, NULL); |
| 61 | BOOL_OPTION(disable_digest, 0, NULL, NULL); |
61 | 62 | BOOL_OPTION(display_stage_header, 0, NULL, NULL); |
62 | 63 | STRING_OPTION(find_base, "/", NULL, NULL); |
63 | 64 | STRING_OPTION(find_prunes, "", NULL, NULL); |