OpenBSD CVS

CVS log for src/bin/mv/cp.c


[BACK] Up to [local] / src / bin / mv

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.10 / (download) - annotate - [select for diffs], Sun Nov 28 19:28:41 2021 UTC (2 years, 6 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, OPENBSD_7_3_BASE, OPENBSD_7_3, OPENBSD_7_2_BASE, OPENBSD_7_2, OPENBSD_7_1_BASE, OPENBSD_7_1, HEAD
Changes since 1.9: +9 -6 lines
Diff to previous 1.9 (colored)

Stop using MAXBSIZE to eliminate sys/param.h including (which injects a
ton of namespace intrusion).  Create local sizes, and refactor some code
along the way.
ok millert

Revision 1.9 / (download) - annotate - [select for diffs], Sun Oct 24 21:24:21 2021 UTC (2 years, 7 months ago) by deraadt
Branch: MAIN
Changes since 1.8: +4 -4 lines
Diff to previous 1.8 (colored)

For open/openat, if the flags parameter does not contain O_CREAT, the
3rd (variadic) mode_t parameter is irrelevant.  Many developers in the past
have passed mode_t (0, 044, 0644, or such), which might lead future people
to copy this broken idiom, and perhaps even believe this parameter has some
meaning or implication or application. Delete them all.
This comes out of a conversation where tb@ noticed that a strange (but
intentional) pledge behaviour is to always knock-out high-bits from
mode_t on a number of system calls as a safety factor, and his bewilderment
that this appeared to be happening against valid modes (at least visually),
but no sorry, they are all irrelevant junk.  They could all be 0xdeafbeef.
ok millert

Revision 1.8 / (download) - annotate - [select for diffs], Fri Jun 28 13:34:59 2019 UTC (4 years, 11 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_7_0_BASE, OPENBSD_7_0, OPENBSD_6_9_BASE, OPENBSD_6_9, OPENBSD_6_8_BASE, OPENBSD_6_8, OPENBSD_6_7_BASE, OPENBSD_6_7, OPENBSD_6_6_BASE, OPENBSD_6_6
Changes since 1.7: +5 -5 lines
Diff to previous 1.7 (colored)

When system calls indicate an error they return -1, not some arbitrary
value < 0.  errno is only updated in this case.  Change all (most?)
callers of syscalls to follow this better, and let's see if this strictness
helps us in the future.

Revision 1.7 / (download) - annotate - [select for diffs], Sun Dec 27 01:25:57 2015 UTC (8 years, 5 months ago) by chl
Branch: MAIN
CVS Tags: OPENBSD_6_5_BASE, OPENBSD_6_5, OPENBSD_6_4_BASE, OPENBSD_6_4, OPENBSD_6_3_BASE, OPENBSD_6_3, OPENBSD_6_2_BASE, OPENBSD_6_2, OPENBSD_6_1_BASE, OPENBSD_6_1, OPENBSD_6_0_BASE, OPENBSD_6_0, OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.6: +3 -3 lines
Diff to previous 1.6 (colored)

remove unused variable

ok tedu@

Revision 1.6 / (download) - annotate - [select for diffs], Sat Dec 26 18:11:43 2015 UTC (8 years, 5 months ago) by guenther
Branch: MAIN
Changes since 1.5: +3 -18 lines
Diff to previous 1.5 (colored)

Set the times, mode, and flags on symlinks when doing cp -p (or mv across
filesystems)

problem noted by Carsten Kunze (carsten.kunze (at) arcor.de)

Revision 1.5 / (download) - annotate - [select for diffs], Tue Nov 17 19:11:11 2015 UTC (8 years, 6 months ago) by tedu
Branch: MAIN
Changes since 1.4: +2 -3 lines
Diff to previous 1.4 (colored)

don't need locale header anymore

Revision 1.4 / (download) - annotate - [select for diffs], Tue Nov 17 18:53:22 2015 UTC (8 years, 6 months ago) by tedu
Branch: MAIN
Changes since 1.3: +4 -17 lines
Diff to previous 1.3 (colored)

remove some more flags

Revision 1.3 / (download) - annotate - [select for diffs], Tue Nov 17 18:39:18 2015 UTC (8 years, 6 months ago) by tedu
Branch: MAIN
Changes since 1.2: +12 -61 lines
Diff to previous 1.2 (colored)

remove Rflag and pflag (1) and rflag (0).

Revision 1.2 / (download) - annotate - [select for diffs], Tue Nov 17 18:34:00 2015 UTC (8 years, 6 months ago) by tedu
Branch: MAIN
Changes since 1.1: +5 -51 lines
Diff to previous 1.1 (colored)

remove getopt() from the nested cp and rm mains

Revision 1.1 / (download) - annotate - [select for diffs], Tue Nov 17 17:24:26 2015 UTC (8 years, 6 months ago) by tedu
Branch: MAIN

direct copy of cp and rm code into mv, so it can avoid fork+exec.
some or even most of the code can still be streamlined more.
ok deraadt

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.