summaryrefslogtreecommitdiff
path: root/src/mv.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2001-08-13 08:36:16 +0000
committerJim Meyering <jim@meyering.net>2001-08-13 08:36:16 +0000
commit2e915411471598340afce389e7efee2a79523a49 (patch)
tree72226e4cef1f2f055bdf46b0a1986ccbc3b3accc /src/mv.c
parentebb48992c0a89d2df3b3419691fad7621094ab38 (diff)
downloadcoreutils-2e915411471598340afce389e7efee2a79523a49.tar.xz
(cp_option_init): Adjust initialization of `interactive',
and initialize new member, stdin_tty. (main): Adjust initialization(s) of `interactive',
Diffstat (limited to 'src/mv.c')
-rw-r--r--src/mv.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/mv.c b/src/mv.c
index a2f1a4c17..c31b7d4f3 100644
--- a/src/mv.c
+++ b/src/mv.c
@@ -110,7 +110,7 @@ cp_option_init (struct cp_options *x)
x->unlink_dest_after_failed_open = 0;
x->failed_unlink_is_fatal = 1;
x->hard_link = 0;
- x->interactive = 0;
+ x->interactive = I_UNSPECIFIED;
x->move_mode = 1;
x->myeuid = geteuid ();
x->one_file_system = 0;
@@ -123,6 +123,7 @@ cp_option_init (struct cp_options *x)
x->symbolic_link = 0;
x->set_mode = 0;
x->mode = 0;
+ x->stdin_tty = isatty (STDIN_FILENO);
/* Find out the current file creation mask, to knock the right bits
when using chmod. The creation mask is set to be liberal, so
@@ -402,10 +403,10 @@ main (int argc, char **argv)
version_control_string = optarg;
break;
case 'f':
- x.interactive = 0;
+ x.interactive = I_OFF;
break;
case 'i':
- x.interactive = 1;
+ x.interactive = I_ON;
break;
case STRIP_TRAILING_SLASHES_OPTION:
remove_trailing_slashes = 1;