Age | Commit message (Collapse) | Author |
|
Use gethrtime if available. Don't assume that clock_gettime succeeds.
Put most random sources first.
|
|
Remove options -dp. Do not read output files.
(long_opts, usage, main, wipefile): Adjust to new options.
("human.h", "quotearg.h"): New includes.
(struct Options): New members contents, links, n_iterations.
Remove allow_devices, remove_file. Change n_iterations to size_t.
All uses changed.
(output_block_size): New var.
(usage): Declare __noreturn__ attribute.
(fdatasync): Define to -1 if not present, since we need to invoke both
fdatasync and fsync if both are present. All invokers of fdatasync
now try fdatasync, then fsync.
(MIXIN): New macro.
(isaac_seed): Use it to mix in values. Add uid, gid to mix.
Don't use gettimeofday, as it has too many porting problems.
(isaac_seedfd): Remove, since we no longer read the output files.
(sizefd): Remove; we now determine size by writing sequentially.
(dopass, wipename, wipefile, main): Clean up error messages.
(dopass): Keep track of offset relative to start of file, not
end, since we may not know how large the file is. If size is
negative, write until we fall off the end of the file.
(wipefd): Do not read output file.
Return 0 if successful, -1 if not; do not make a special case for
non-regular files, since our callers have that info now.
(wipename): Now static. Return errno if error.
(main): "-" now stands for standard output.
Do not shred append-only standard output.
(wipefile): Do not grant read permission to file when wiping it.
Use symbolic permission (S_IWUSR), not octal.
From Paul Eggert.
|
|
via sys2.h.
|
|
Include version-etc.h instead.
(PROGRAM_NAME, AUTHORS): Define.
[long_options]: Add entries for --help and --version.
Remove parse_long_options call.
(main) [getopt switch]: Add a case for each of --help and --version.
|
|
[long_options]: Remove the "help" and "version" entries.
(main): Use parse_long_options, including author name(s).
Remove the show_version and show_help blocks.
|
|
in subdirectories works (dir/file). From Janos Farkas.
|
|
|
|
HAVE_CLOCK_GETTIME, not CLOCK_REALTIME.
(wipename): Rename local dirfd to dir_fd to avoid shadowing the
function declared in Linux's dirent.h.
|
|
[! HAVE_FDATASYNC]: Define to fsync.
From Colin Plumb.
|
|
|
|
|
|
|
|
|
|
|
|
Remove `if __GNUC__ >= 2' guard.
|
|
|
|
|
|
use error in place of pferror
(pferror): Remove.
(wipefd): Use error in place of fprintf(stderr,... call
s/alllocate/allocate
|
|
|
|
Don't include headers already included (and guarded by HAVE_FOO_H tests)
in system.h.
|
|
(struct Options): Declare.
(usage): New function.
(program_name): Rename from argv0
(FLAG_* macros): Remove.
|
|
Use #else/#if, not #elif.
|
|
|
|
|
|
|