summaryrefslogtreecommitdiff
path: root/src/shred.c
AgeCommit message (Collapse)Author
1999-04-03(isaac_seed): Don't overrun the s->mm buffer.Jim Meyering
Use gethrtime if available. Don't assume that clock_gettime succeeds. Put most random sources first.
1999-04-03Add new options -bcCklL and fix some porting problems.Jim Meyering
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.
1999-03-31Don't include closeout.h or version-etc.h explicitly. Now, they're included ↵Jim Meyering
via sys2.h.
1999-03-26No longer include long-options.h.Jim Meyering
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.
1999-03-04Include long-options.hJim Meyering
[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.
1999-02-17(wipename): Fix string thinko. Now, shredding filesJim Meyering
in subdirectories works (dir/file). From Janos Farkas.
1999-02-15*** empty log message ***Jim Meyering
1999-01-25(isaac_seed): Guard clock_gettime with test ofJim Meyering
HAVE_CLOCK_GETTIME, not CLOCK_REALTIME. (wipename): Rename local dirfd to dir_fd to avoid shadowing the function declared in Linux's dirent.h.
1999-01-24(fdatasync): Remove function. instead, ...Jim Meyering
[! HAVE_FDATASYNC]: Define to fsync. From Colin Plumb.
1999-01-23(fdatasync) [! HAVE_FDATASYNC]: New function.Jim Meyering
1999-01-23(wipename): Print the `FILE: deleting' message only when in verbose mode.Jim Meyering
1999-01-23(wipename): Print the `FILE: deleted' message only when in verbose mode.Jim Meyering
1999-01-23always close stdoutJim Meyering
1999-01-23fix typos in commentsJim Meyering
1999-01-23(pfstatus): Use __format__ and __printf__.Jim Meyering
Remove `if __GNUC__ >= 2' guard.
1999-01-23Bracket pfstatus messages with _().Jim Meyering
1999-01-23add parens around STREQJim Meyering
1999-01-23restore mistakenly removed stdio.hJim Meyering
use error in place of pferror (pferror): Remove. (wipefd): Use error in place of fprintf(stderr,... call s/alllocate/allocate
1999-01-23use `%s' rather than \"%s\" everywhereJim Meyering
1999-01-23s/sterilize/shred/gJim Meyering
Don't include headers already included (and guarded by HAVE_FOO_H tests) in system.h.
1999-01-23use getopt_longJim Meyering
(struct Options): Declare. (usage): New function. (program_name): Rename from argv0 (FLAG_* macros): Remove.
1999-01-22Include config.h, getopt.h, system.h and error.h.Jim Meyering
Use #else/#if, not #elif.
1999-01-18indent -- sorry Colin.Jim Meyering
1999-01-18cpp-indent #error lineJim Meyering
1999-01-18.Jim Meyering