View | Details | Raw Unified | Return to bug 199466
Collapse All | Expand All

(-)b/bin/cp/cp.1 (-2 / +2 lines)
Lines 84-93 If the Link Here
84
.Fl R
84
.Fl R
85
option is specified, all symbolic links are followed.
85
option is specified, all symbolic links are followed.
86
.It Fl P
86
.It Fl P
87
No symbolic links are followed.
87
If the
88
If the
88
.Fl R
89
.Fl R
89
option is specified, no symbolic links are followed.
90
option is specified, this is the default.
90
This is the default.
91
.It Fl R
91
.It Fl R
92
If
92
If
93
.Ar source_file
93
.Ar source_file
(-)b/bin/cp/cp.c (-7 / +10 lines)
Lines 99-105 main(int argc, char *argv[]) Link Here
99
{
99
{
100
	struct stat to_stat, tmp_stat;
100
	struct stat to_stat, tmp_stat;
101
	enum op type;
101
	enum op type;
102
	int Hflag, Lflag, ch, fts_options, r, have_trailing_slash;
102
	int Hflag, Lflag, Pflag, ch, fts_options, r, have_trailing_slash;
103
	char *target;
103
	char *target;
104
104
105
	fts_options = FTS_NOCHDIR | FTS_PHYSICAL;
105
	fts_options = FTS_NOCHDIR | FTS_PHYSICAL;
Lines 108-120 main(int argc, char *argv[]) Link Here
108
		switch (ch) {
108
		switch (ch) {
109
		case 'H':
109
		case 'H':
110
			Hflag = 1;
110
			Hflag = 1;
111
			Lflag = 0;
111
			Lflag = Pflag = 0;
112
			break;
112
			break;
113
		case 'L':
113
		case 'L':
114
			Lflag = 1;
114
			Lflag = 1;
115
			Hflag = 0;
115
			Hflag = Pflag = 0;
116
			break;
116
			break;
117
		case 'P':
117
		case 'P':
118
			Pflag = 1;
118
			Hflag = Lflag = 0;
119
			Hflag = Lflag = 0;
119
			break;
120
			break;
120
		case 'R':
121
		case 'R':
Lines 123-128 main(int argc, char *argv[]) Link Here
123
		case 'a':
124
		case 'a':
124
			pflag = 1;
125
			pflag = 1;
125
			Rflag = 1;
126
			Rflag = 1;
127
			Pflag = 1;
126
			Hflag = Lflag = 0;
128
			Hflag = Lflag = 0;
127
			break;
129
			break;
128
		case 'f':
130
		case 'f':
Lines 145-151 main(int argc, char *argv[]) Link Here
145
			break;
147
			break;
146
		case 'r':
148
		case 'r':
147
			rflag = Lflag = 1;
149
			rflag = Lflag = 1;
148
			Hflag = 0;
150
			Hflag = Pflag = 0;
149
			break;
151
			break;
150
		case 's':
152
		case 's':
151
			sflag = 1;
153
			sflag = 1;
Lines 180-187 main(int argc, char *argv[]) Link Here
180
			fts_options |= FTS_LOGICAL;
182
			fts_options |= FTS_LOGICAL;
181
		}
183
		}
182
	} else {
184
	} else {
183
		fts_options &= ~FTS_PHYSICAL;
185
		if (!Pflag) {
184
		fts_options |= FTS_LOGICAL | FTS_COMFOLLOW;
186
			fts_options &= ~FTS_PHYSICAL;
187
			fts_options |= FTS_LOGICAL | FTS_COMFOLLOW;
188
		}
185
	}
189
	}
186
	(void)signal(SIGINFO, siginfo);
190
	(void)signal(SIGINFO, siginfo);
187
191
188
- 

Return to bug 199466