From owner-svn-src-all@FreeBSD.ORG Sun Apr 11 16:28:10 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9D0691065673; Sun, 11 Apr 2010 16:28:10 +0000 (UTC) (envelope-from kientzle@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 828FE8FC2A; Sun, 11 Apr 2010 16:28:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3BGSAfj049871; Sun, 11 Apr 2010 16:28:10 GMT (envelope-from kientzle@svn.freebsd.org) Received: (from kientzle@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3BGSAPE049869; Sun, 11 Apr 2010 16:28:10 GMT (envelope-from kientzle@svn.freebsd.org) Message-Id: <201004111628.o3BGSAPE049869@svn.freebsd.org> From: Tim Kientzle Date: Sun, 11 Apr 2010 16:28:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206485 - head/usr.bin/tar X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Apr 2010 16:28:10 -0000 Author: kientzle Date: Sun Apr 11 16:28:10 2010 New Revision: 206485 URL: http://svn.freebsd.org/changeset/base/206485 Log: Diff reduction against bsdtar 2.8.3 Modified: head/usr.bin/tar/tree.h Modified: head/usr.bin/tar/tree.h ============================================================================== --- head/usr.bin/tar/tree.h Sun Apr 11 16:27:38 2010 (r206484) +++ head/usr.bin/tar/tree.h Sun Apr 11 16:28:10 2010 (r206485) @@ -53,16 +53,17 @@ void tree_close(struct tree *); /* * tree_next() returns Zero if there is no next entry, non-zero if - * there is. Note that directories are potentially visited three - * times. Directories are always visited first as part of enumerating - * their parent. If tree_descend() is invoked at that time, the - * directory is added to a work list and will subsequently be visited - * two more times: once just after descending into the directory and - * again just after ascending back to the parent. + * there is. Note that directories are visited three times. + * Directories are always visited first as part of enumerating their + * parent; that is a "regular" visit. If tree_descend() is invoked at + * that time, the directory is added to a work list and will + * subsequently be visited two more times: once just after descending + * into the directory ("postdescent") and again just after ascending + * back to the parent ("postascent"). * * TREE_ERROR_DIR is returned if the descent failed (because the * directory couldn't be opened, for instance). This is returned - * instead of TREE_PREVISIT/TREE_POSTVISIT. TREE_ERROR_DIR is not a + * instead of TREE_POSTDESCENT/TREE_POSTASCENT. TREE_ERROR_DIR is not a * fatal error, but it does imply that the relevant subtree won't be * visited. TREE_ERROR_FATAL is returned for an error that left the * traversal completely hosed. Right now, this is only returned for @@ -96,10 +97,23 @@ void tree_descend(struct tree *); int tree_current_depth(struct tree *); /* - * The current full pathname, length of the full pathname, - * and a name that can be used to access the file. - * Because tree does use chdir extensively, the access path is - * almost never the same as the full current path. + * The current full pathname, length of the full pathname, and a name + * that can be used to access the file. Because tree does use chdir + * extensively, the access path is almost never the same as the full + * current path. + * + * TODO: Flesh out this interface to provide other information. In + * particular, Windows can provide file size, mode, and some permission + * information without invoking stat() at all. + * + * TODO: On platforms that support it, use openat()-style operations + * to eliminate the chdir() operations entirely while still supporting + * arbitrarily deep traversals. This makes access_path troublesome to + * support, of course, which means we'll need a rich enough interface + * that clients can function without it. (In particular, we'll need + * tree_current_open() that returns an open file descriptor.) + * + * TODO: Provide tree_current_archive_entry(). */ const char *tree_current_path(struct tree *); size_t tree_current_pathlen(struct tree *);