[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] Mkbuildtree little fix



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 <ydroneaud@xxxxxxxxxxxx>
Consulting Engineer
Professional Services
Mandriva http://mandriva.com/ (previously known as Mandrakesoft)


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.