From: Yann Droneaud Subject: Mkbuildtree little fix Date: Tue, 03 May 2005 18:06:05 +0200 Message-ID: <1115136366.11669.3.camel@firedrake.mandriva.com> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org Hi, here is a really small fix for mkbuildtree. With my 'find' version [1], I get many of these warning when using mkbuildtree: find: warning: you have specified the -maxdepth option after a non-option argument -type, but options are not positional (-maxdepth affects tests specified before it as well as those specified after it). Please specify options before other arguments. My patch just correct the ordering of the options, it should be harmless, but I didn't test with other versions of find. Regards [1] find --version GNU find version 4.2.20 Features enabled: D_TYPE O_NOFOLLOW(enabled) xen-unstable-mkbuildtree-find-maxpath.patch: diff -urN -x '*~' xen-unstable/linux-2.4.29-xen-sparse/mkbuildtree xen-unstable.new/linux-2.4.29-xen-sparse/mkbuildtree --- xen-unstable/linux-2.4.29-xen-sparse/mkbuildtree 2005-05-02 23:11:47.000000000 -0400 +++ xen-unstable.new/linux-2.4.29-xen-sparse/mkbuildtree 2005-05-03 11:23:24.767206520 -0400 @@ -66,7 +66,7 @@ ( cd $i pref=`echo $i | sed -e 's#/[^/]*#../#g' -e 's#^\.##'` - for j in `find . -type f -o -type l -maxdepth 1`; do + for j in `find . -maxdepth 1 -type f -o -type l`; do ln -sf ${pref}${REAL_DIR}/$i/$j ${SYMLINK_DIR}/$i/$j done ) diff -urN -x '*~' xen-unstable/linux-2.6.11-xen-sparse/mkbuildtree xen-unstable.new/linux-2.6.11-xen-sparse/mkbuildtree --- xen-unstable/linux-2.6.11-xen-sparse/mkbuildtree 2005-05-02 23:11:45.000000000 -0400 +++ xen-unstable.new/linux-2.6.11-xen-sparse/mkbuildtree 2005-05-03 11:19:18.441653696 -0400 @@ -66,7 +66,7 @@ ( cd $i pref=`echo $i | sed -e 's#/[^/]*#../#g' -e 's#^\.##'` - for j in `find . -type f -o -type l -maxdepth 1`; do + for j in `find . -maxdepth 1 -type f -o -type l`; do ln -sf ${pref}${REAL_DIR}/$i/$j ${SYMLINK_DIR}/$i/$j done ) -- Yann Droneaud Consulting Engineer Professional Services Mandriva http://mandriva.com/ (previously known as Mandrakesoft)