Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/mtree Default a bare "." with no type to F_DIR. For...
details: https://anonhg.NetBSD.org/src/rev/a0f9a4333da0
branches: trunk
changeset: 790521:a0f9a4333da0
user: christos <christos%NetBSD.org@localhost>
date: Wed Oct 16 17:26:14 2013 +0000
description:
Default a bare "." with no type to F_DIR. For FreeBSD compatibility (Brooks
Davis)
diffstat:
usr.sbin/mtree/spec.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diffs (31 lines):
diff -r b45da7d9cab6 -r a0f9a4333da0 usr.sbin/mtree/spec.c
--- a/usr.sbin/mtree/spec.c Wed Oct 16 17:24:20 2013 +0000
+++ b/usr.sbin/mtree/spec.c Wed Oct 16 17:26:14 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: spec.c,v 1.86 2013/09/09 23:27:43 christos Exp $ */
+/* $NetBSD: spec.c,v 1.87 2013/10/16 17:26:14 christos Exp $ */
/*-
* Copyright (c) 1989, 1993
@@ -67,7 +67,7 @@
#if 0
static char sccsid[] = "@(#)spec.c 8.2 (Berkeley) 4/28/95";
#else
-__RCSID("$NetBSD: spec.c,v 1.86 2013/09/09 23:27:43 christos Exp $");
+__RCSID("$NetBSD: spec.c,v 1.87 2013/10/16 17:26:14 christos Exp $");
#endif
#endif /* not lint */
@@ -217,6 +217,12 @@
/*
* empty tree
*/
+ /*
+ * Allow a bare "." root node by forcing it to
+ * type=dir for compatibility with FreeBSD.
+ */
+ if (strcmp(centry->name, ".") == 0 && centry->type == 0)
+ centry->type = F_DIR;
if (strcmp(centry->name, ".") != 0 ||
centry->type != F_DIR)
mtree_err(
Home |
Main Index |
Thread Index |
Old Index