Commit Graph

6446 Commits

Author SHA1 Message Date
Jim Meyering 034df8db20 *** empty log message *** 1999-04-04 04:34:16 +00:00
Jim Meyering 8fe009ed7c back out Paul's changes 1999-04-04 02:34:49 +00:00
Jim Meyering c21cecaea8 Use AUTHORS in place of string in parse_long_options call. 1999-04-03 05:26:48 +00:00
Jim Meyering 1d47220ab2 Insert AUTHORS definition. 1999-04-03 05:22:05 +00:00
Jim Meyering cf691ec714 Use PROGRAM_NAME in place of string in parse_long_options call. 1999-04-03 05:20:06 +00:00
Jim Meyering 7c2d5de6c7 define PROGRAM_NAME 1999-04-03 05:01:48 +00:00
Jim Meyering db6ce0481b *** empty log message *** 1999-04-03 03:29:41 +00:00
Jim Meyering 98327bba60 (S_IWUSR): Define if not already defined. 1999-04-03 03:29:17 +00:00
Jim Meyering a29afcb470 (isaac_seed): Don't overrun the s->mm buffer.
Use gethrtime if available.  Don't assume that clock_gettime succeeds.
Put most random sources first.
1999-04-03 03:27:57 +00:00
Jim Meyering bf504d2a46 Add new options -bcCklL and fix some porting problems.
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-04-03 03:27:27 +00:00
Jim Meyering ce9c687d5a [HAVE_SYS_ACL_H]: Include sys/acl.h.
(struct fileinfo): New member `have_acl'.
(gobble_file): Initialize it.
(print_long_format): Use it.
Mostly from Alen Muzinic.
1999-04-02 05:38:15 +00:00
Jim Meyering eaaff3246a *** empty log message *** 1999-04-02 04:24:48 +00:00
Jim Meyering 7ba3c38741 *** empty log message *** 1999-04-02 04:20:17 +00:00
Jim Meyering c69d22ae26 *** empty log message *** 1999-04-02 04:15:14 +00:00
Jim Meyering 35aee6bf13 (open_maybe_create): New function.
(touch): Rewrite not to use `creat' and to eliminate a race
condition that could make touch truncate a nonempty file.
Report and suggestions from Andrew Tridgell.
1999-04-02 02:55:10 +00:00
Jim Meyering ac03113efe *** empty log message *** 1999-04-02 02:47:58 +00:00
Jim Meyering bbea0501a9 *** empty log message *** 1999-04-01 05:16:46 +00:00
Jim Meyering a7b641acd5 (main): Qualify a char* with the `const' keyword. 1999-04-01 05:15:37 +00:00
Jim Meyering c4cf0531ff (main): Qualify a char* with the `const' keyword. 1999-04-01 05:10:41 +00:00
Jim Meyering a7d0351c20 (install_file_in_dir): Qualify a char* with the `const' keyword. 1999-04-01 05:09:59 +00:00
Jim Meyering beb464c0ea (main): Qualify a char* with the `const' keyword. 1999-04-01 05:08:22 +00:00
Jim Meyering d8a18c33e8 (main): Qualify a char* with the `const' keyword. 1999-04-01 05:07:51 +00:00
Jim Meyering abdc079cd5 Remove prototypes and tsort function definitions. 1999-04-01 05:05:17 +00:00
Jim Meyering d0b9ad729c (main): Qualify a char* with the `const' keyword. 1999-04-01 04:58:29 +00:00
Jim Meyering 24df6275fb (main): Move the declaration of `e' into the scope
where it's used and make it `const'.
1999-04-01 04:56:28 +00:00
Jim Meyering 2500fe4079 (main): Qualify a char* with the `const' keyword. 1999-04-01 04:53:13 +00:00
Jim Meyering 3a3189e6c3 (touch): Qualify a char* with the `const' keyword. 1999-04-01 04:47:55 +00:00
Jim Meyering db3c0ffb44 . 1999-03-31 15:21:00 +00:00
Jim Meyering 8935f38d4e *** empty log message *** 1999-03-31 06:02:07 +00:00
Jim Meyering 667799f7e2 Don't include closeout.h or version-etc.h explicitly. Now, they're included via sys2.h. 1999-03-31 05:59:13 +00:00
Jim Meyering d30f9691c1 *** empty log message *** 1999-03-31 05:54:11 +00:00
Jim Meyering fdd07e3d2b No longer include long-options.h.
[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-31 05:52:46 +00:00
Jim Meyering 419aa42181 Include "closeout.h" and "version-etc.h" 1999-03-31 05:52:46 +00:00
Jim Meyering 516b48e7a2 (AUTHORS): Actually define and use. 1999-03-31 05:06:42 +00:00
Jim Meyering 03c1b8518c (PROGRAM_NAME, AUTHORS): Define and use. 1999-03-31 04:16:08 +00:00
Jim Meyering 39090114f0 (PROGRAM_NAME, AUTHORS): Define and use. 1999-03-31 04:11:35 +00:00
Jim Meyering b2513fc340 import latest 1999-03-30 15:11:20 +00:00
Jim Meyering b989ccb248 . 1999-03-30 05:40:40 +00:00
Jim Meyering 2067a9fe97 . 1999-03-30 04:52:57 +00:00
Jim Meyering a717cdf2d6 (make_node_op_equals): New function.
(mode_append_entry): Likewise.
(mode_compile): When none of [ugoa] is specified in an `=OP' change
mode request, insert a `=0' entry into the linked list so that all
bits are cleared first.  Use the new functions.
1999-03-30 04:51:08 +00:00
Jim Meyering bb0631e825 *** empty log message *** 1999-03-30 04:48:57 +00:00
Jim Meyering 9dab31b501 (rmdir): Use pid_t instead of int; check status
against zero.  This is to improve portability.
1999-03-30 04:48:41 +00:00
Jim Meyering 2080baecff (rename): Use pid_t instead of int; check status
against zero.  This is to improve portability.
1999-03-30 04:48:17 +00:00
Jim Meyering 69952761e1 (mkdir): Use pid_t instead of int; check status
against zero.  This is to improve portability.
1999-03-30 04:47:52 +00:00
Jim Meyering 319976a665 (strip): Use standard "cannot fork" message.
Check for strip nonzero exit status.
1999-03-30 04:43:53 +00:00
Jim Meyering 8137487dd7 *** empty log message *** 1999-03-30 04:36:00 +00:00
Jim Meyering 0b1a5f6fe9 *** empty log message *** 1999-03-30 04:34:46 +00:00
Jim Meyering 236d3671e2 *** empty log message *** 1999-03-30 04:33:22 +00:00
Jim Meyering ab33da4b55 (jm_CHECK_ALL_TYPES): New macro. 1999-03-30 04:29:19 +00:00
Jim Meyering 34f0f5c2c9 *** empty log message *** 1999-03-29 04:39:56 +00:00