summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorOtto Moerbeek <otto@cvs.openbsd.org>2004-12-13 20:25:35 +0000
committerOtto Moerbeek <otto@cvs.openbsd.org>2004-12-13 20:25:35 +0000
commit9767aa7c2ded4afcf30aa0d038c75eea3378b84d (patch)
tree5943afbf5c097a6af5d3fdfa0185e2265a4917b4 /bin
parenta9285758eebb8bbbced985a59446867f3334bb2b (diff)
Only warn if we try to cp(1) a socket. Consequently, this makes
mv(1)ing trees containing sockets across filesystems much more smooth. ok millert@ tedu@ fgsch@ pedro@ deraadt@
Diffstat (limited to 'bin')
-rw-r--r--bin/cp/cp.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/bin/cp/cp.c b/bin/cp/cp.c
index 36dea977e4c..fb88e0bcee9 100644
--- a/bin/cp/cp.c
+++ b/bin/cp/cp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cp.c,v 1.28 2003/10/30 16:01:43 millert Exp $ */
+/* $OpenBSD: cp.c,v 1.29 2004/12/13 20:25:34 otto Exp $ */
/* $NetBSD: cp.c,v 1.14 1995/09/07 06:14:51 jtc Exp $ */
/*
@@ -43,7 +43,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)cp.c 8.5 (Berkeley) 4/29/95";
#else
-static char rcsid[] = "$OpenBSD: cp.c,v 1.28 2003/10/30 16:01:43 millert Exp $";
+static char rcsid[] = "$OpenBSD: cp.c,v 1.29 2004/12/13 20:25:34 otto Exp $";
#endif
#endif /* not lint */
@@ -445,6 +445,9 @@ copy(char *argv[], enum op type, int fts_options)
if (copy_file(curr, fts_dne(curr)))
rval = 1;
break;
+ case S_IFSOCK:
+ warnx("%s: %s", curr->fts_path, strerror(EOPNOTSUPP));
+ break;
default:
if (copy_file(curr, fts_dne(curr)))
rval = 1;