Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-4]: src/usr.sbin/mtree Pull up revision 1.24 (requested by wenn...
details: https://anonhg.NetBSD.org/src/rev/f5283c6c46ef
branches: netbsd-1-4
changeset: 469710:f5283c6c46ef
user: he <he%NetBSD.org@localhost>
date: Sat Nov 20 16:58:17 1999 +0000
description:
Pull up revision 1.24 (requested by wennmach and joda):
Make mtree able to properly encode file names with `funny' albeit
legal characters (`#', ` ', binary characters), fixing PR#5006 and
PR#7663.
diffstat:
usr.sbin/mtree/create.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diffs (38 lines):
diff -r 97dd39a618a3 -r f5283c6c46ef usr.sbin/mtree/create.c
--- a/usr.sbin/mtree/create.c Sat Nov 20 16:46:38 1999 +0000
+++ b/usr.sbin/mtree/create.c Sat Nov 20 16:58:17 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: create.c,v 1.21 1999/02/11 15:32:23 mrg Exp $ */
+/* $NetBSD: create.c,v 1.21.2.1 1999/11/20 16:58:17 he Exp $ */
/*-
* Copyright (c) 1989, 1993
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)create.c 8.1 (Berkeley) 6/6/93";
#else
-__RCSID("$NetBSD: create.c,v 1.21 1999/02/11 15:32:23 mrg Exp $");
+__RCSID("$NetBSD: create.c,v 1.21.2.1 1999/11/20 16:58:17 he Exp $");
#endif
#endif /* not lint */
@@ -69,6 +69,7 @@
static uid_t uid;
static mode_t mode;
static u_long flags;
+static char codebuf[4*MAXPATHLEN + 1];
static int dsort __P((const FTSENT **, const FTSENT **));
static void output __P((int *, const char *, ...));
@@ -134,9 +135,9 @@
int fd, indent;
if (S_ISDIR(p->fts_statp->st_mode))
- indent = printf("%s", p->fts_name);
+ indent = printf("%s", encode(codebuf, p->fts_name));
else
- indent = printf(" %s", p->fts_name);
+ indent = printf(" %s", encode(codebuf, p->fts_name));
if (indent > INDENTNAMELEN)
indent = MAXLINELEN;
Home |
Main Index |
Thread Index |
Old Index