int c;
bool ok;
bool make_backups = false;
- char *backup_suffix_string;
char *version_control_string = NULL;
struct cp_options x;
bool copy_contents = false;
selinux_enabled = (0 < is_selinux_enabled ());
cp_option_init (&x);
- /* FIXME: consider not calling getenv for SIMPLE_BACKUP_SUFFIX unless
- we'll actually use backup_suffix_string. */
- backup_suffix_string = getenv ("SIMPLE_BACKUP_SUFFIX");
-
while ((c = getopt_long (argc, argv, "abdfHilLnprst:uvxPRS:TZ",
long_opts, NULL))
!= -1)
case 'S':
make_backups = true;
- backup_suffix_string = optarg;
+ simple_backup_suffix = optarg;
break;
case_GETOPT_HELP_CHAR;
usage (EXIT_FAILURE);
}
- if (backup_suffix_string)
- simple_backup_suffix = xstrdup (backup_suffix_string);
-
x.backup_type = (make_backups
? xget_version (_("backup type"),
version_control_string)
int exit_status = EXIT_SUCCESS;
const char *specified_mode = NULL;
bool make_backups = false;
- char *backup_suffix_string;
char *version_control_string = NULL;
bool mkdir_and_install = false;
struct cp_options x;
dir_arg = false;
umask (0);
- /* FIXME: consider not calling getenv for SIMPLE_BACKUP_SUFFIX unless
- we'll actually use backup_suffix_string. */
- backup_suffix_string = getenv ("SIMPLE_BACKUP_SUFFIX");
-
while ((optc = getopt_long (argc, argv, "bcCsDdg:m:o:pt:TvS:Z", long_options,
NULL)) != -1)
{
break;
case 'S':
make_backups = true;
- backup_suffix_string = optarg;
+ simple_backup_suffix = optarg;
break;
case 't':
if (target_directory)
quoteaf (target_directory));
}
- if (backup_suffix_string)
- simple_backup_suffix = xstrdup (backup_suffix_string);
-
x.backup_type = (make_backups
? xget_version (_("backup type"),
version_control_string)
int c;
bool ok;
bool make_backups = false;
- char *backup_suffix_string;
char *version_control_string = NULL;
char const *target_directory = NULL;
bool no_target_directory = false;
atexit (close_stdin);
- /* FIXME: consider not calling getenv for SIMPLE_BACKUP_SUFFIX unless
- we'll actually use backup_suffix_string. */
- backup_suffix_string = getenv ("SIMPLE_BACKUP_SUFFIX");
-
symbolic_link = remove_existing_files = interactive = verbose
= hard_dir_link = false;
break;
case 'S':
make_backups = true;
- backup_suffix_string = optarg;
+ simple_backup_suffix = optarg;
break;
case_GETOPT_HELP_CHAR;
case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
quoteaf (file[n_files - 1]));
}
- if (backup_suffix_string)
- simple_backup_suffix = xstrdup (backup_suffix_string);
-
backup_type = (make_backups
? xget_version (_("backup type"), version_control_string)
: no_backups);
int c;
bool ok;
bool make_backups = false;
- char *backup_suffix_string;
char *version_control_string = NULL;
struct cp_options x;
char *target_directory = NULL;
/* Try to disable the ability to unlink a directory. */
priv_set_remove_linkdir ();
- /* FIXME: consider not calling getenv for SIMPLE_BACKUP_SUFFIX unless
- we'll actually use backup_suffix_string. */
- backup_suffix_string = getenv ("SIMPLE_BACKUP_SUFFIX");
-
while ((c = getopt_long (argc, argv, "bfint:uvS:TZ", long_options, NULL))
!= -1)
{
break;
case 'S':
make_backups = true;
- backup_suffix_string = optarg;
+ simple_backup_suffix = optarg;
break;
case 'Z':
/* As a performance enhancement, don't even bother trying
usage (EXIT_FAILURE);
}
- if (backup_suffix_string)
- simple_backup_suffix = xstrdup (backup_suffix_string);
-
x.backup_type = (make_backups
? xget_version (_("backup type"),
version_control_string)