Age | Commit message (Collapse) | Author |
|
|
|
|
|
from rand-isaac.c.
|
|
|
|
|
|
|
|
Don't include md5.h; it wasn't needed.
(struct keyfield): Rename random_hash to random, for consistency
with the other member names. All uses changed.
(usage): Tweak wording to mention STRING for --seed option.
(short_options): Rorder for consistency with other programs.
(rand_state): Now a struct, not a pointer to one. All uses changed.
(HASH_WORDS, HASH_SIZE): Remove.
(get_hash): Remove comments around resbuf size, since we can assume C89.
Use a "more-kosher" (but slower) approach of invoking isaac_refill.
(keycompare): Adjust to the new get_hash.
Add a FIXME.
(badfieldspec): Omit recently-introduced comment; it isn't needed.
(main): Don't set need_random simply because gkey has it set; that
doesn't necessarily mean we'll need random numbers.
Redo seeding to match new get_hash approach.
|
|
(fillrand, dopass, main): Undo previous change.
|
|
changing it to allow for varying numbers of words in the state.
Alter so that we include rand-isaac.c directly rather than
compiling it and linking to it. Don't include config.h or
system.h; that's the includer's responsibility.
(ISAAC_LOG, ISAAC_WORDS, ISAAC_BYTES, struct isaac_state, ind):
(isaac_step, struct irand_state):
Resurrect these, with the same defns that used to be in shred.c.
(ISAAC_SIZE, isaac_new, isaac_copy): Remove.
(isaac_refill, isaac_seed_start, isaac_seed_data, irand_init, irand32):
static again.
(struct isaac_state, isaac_refill, isaac_mix, isaac_init):
(isaac_seed_start, isaac_seed_data, isaac_seed_finish, isaac_seed):
(irand_init, irand32, irand_mod):
Number of words is constant again.
|
|
|
|
|
|
Make the local an `int' instead.
|
|
(isaac_refill): Don't try to negate a
local of type uint32_t. Convert it to int32_t first.
|
|
|
|
Mark all other functions as `extern' so the tight-scope
part of `make distcheck' passes once again.
* src/rand-isaac.h (isaac_mix): Remove declaration.
|
|
(main): Split a long line so it fits in 80 columns.
|
|
|
|
causing `make distcheck' to fail.
|
|
(usage): Add options --random-sort and --seed to implement a random
shuffle.
Include md5.h and rand-isaac.h.
(get_hash): New function.
(rand_state): New var.
(HASH_WORDS, HASH_SIZE): New macros.
|
|
(fillrand, main): Adjust to the fact that the state size is now
runtime-configurable.
|
|
(shred_SOURCES, sort_SOURCES): New macros, so we compile rand-isaac.c.
|
|
Make state size runtime-configurable.
(isaac_new, isaac_copy): New functions.
|
|
|
|
From The Wanderer.
|
|
|
|
|
|
|
|
(set_owner, preserve_author): New functions, factored out of copy_reg.
(copy_reg): Use them.
(copy_internal): Use them here, too.
From Andreas Gruenbacher.
|
|
|
|
|
|
|
|
testing-only option to start with `-', so that it cannot render
ambiguous any prefix it happens to share with some other option name.
|
|
testing-only option to start with `-', so that it cannot render
ambiguous any prefix it happens to share with some other option name.
|
|
(usage): -a includes dummy file systems, not size-0 file systems.
|
|
to avoid collision with POSIX name space. All uses changed.
|
|
unnecessary system calls and going to a block size of at least
8192 (on normal hosts, anyway). This improved performance 5% on my
Debian stable host (2.4.27 kernel, x86, copying from root
ext3 file system to itself).
Include "buffer-lcm.h".
(copy_reg): Omit last argument. All callers changed.
Use xmalloc to allocate rather than trusting alloca
(which is unwise with large block sizes).
Declare locals more locally, if possible.
Use uintptr_t words instead of int words, for a bit more speed
when looking for null blocks on 64-bit hosts.
Optimize away reads of zero bytes on regular files.
In the typical case, insist on 8 KiB buffers, at least.
Avoid unnecessary extra call to fstat when checking for sparse files.
Avoid now-unnecessary cast to off_t, and "0L".
Avoid unnecessary test of *new_dst when checking for same owner
and group.
|
|
|
|
|
|
|
|
|
|
|
|
that provide openat (Solaris), and on systems like Linux+procfs
where our openat emulation code is reentrant. This also fixes a
few low-probability leaks and eliminates some code that could,
in very unusual circumstances, cause rm() (via a callee) to exit.
|
|
|
|
(AD_mark_current_as_unremovable): Likewise, but for a local.
(rm_1): Likewise.
|
|
|
|
(do_link): Don't use alloca on a buffer of unbounded size.
|
|
|
|
|
|
turn acts like --time-style='posix-long-iso' if the locale settings
are messed up.
|
|
|