virsh: make tree listing more flexible
virsh: make tree listing more flexible

Requiring the user to pass in parallel arrays of names and parents
is annoying; it means that you can't qsort one of the arrays without
invalidating the ordering of the other.  By refactoring this function
to use callbacks, we isolate the layout to be independent of the
printing, and a future patch can exploit that to improve layout.

* tools/virsh.c (vshTreePrintInternal): Use callbacks rather than
requiring a char** array.
(vshTreeArrayLookup): New helper function.
(vshTreePrint, cmdNodeListDevices, cmdSnapshotList): Update callers.

wiedi/libvirt,iam-TJ/libvirt,andreabolognani/libvirt,trainstack/libvirt,jardasgit/libvirt,wiedi/libvirt,cbosdo/libvirt,zippy2/libvirt,crobinso/libvirt,iam-TJ/libvirt,rmarwaha/libvirt,olafhering/libvirt,trainstack/libvirt,fabianfreyer/libvirt,taget/libvirt,siboulet/libvirt-openvz,libvirt/libvirt,elmarco/libvirt,andreabolognani/libvirt,jardasgit/libvirt,jeckersb/libvirt,rlaager/libvirt,warewolf/libvirt,emaste/libvirt,jeckersb/libvirt,datto/libvirt,nertpinx/libvirt,andreabolognani/libvirt,cbosdo/libvirt,emaste/libvirt,taget/libvirt,trainstack/libvirt,zhlcindy/libvirt-1.1.4-maintain,shugaoye/libvirt,warewolf/libvirt,warewolf/libvirt,cbosdo/libvirt,elmarco/libvirt,jardasgit/libvirt,novel/fbsd-libvirt,novel/fbsd-libvirt,wiedi/libvirt,taget/libvirt,dumbbell/libvirt,fabianfreyer/libvirt,bjzhang/libvirt,elmarco/libvirt,taget/libvirt,dumbbell/libvirt,fabianfreyer/libvirt,rmarwaha/libvirt1,novel/fbsd-libvirt,rmarwaha/libvirt1,emaste/libvirt,jardasgit/libvirt,wiedi/libvirt,agx/libvirt,siboulet/libvirt-openvz,bjzhang/libvirt,zippy2/libvirt,agx/libvirt,agx/libvirt,iam-TJ/libvirt,shugaoye/libvirt,dumbbell/libvirt,fabianfreyer/libvirt,siboulet/libvirt-openvz,rlaager/libvirt,zhlcindy/libvirt-1.1.4-maintain,wiedi/libvirt,rlaager/libvirt,jardasgit/libvirt,dumbbell/libvirt,novel/fbsd-libvirt,zhlcindy/libvirt-1.1.4-maintain,shugaoye/libvirt,VenkatDatta/libvirt,libvirt/libvirt,trainstack/libvirt,crobinso/libvirt,trainstack/libvirt,jfehlig/libvirt,VenkatDatta/libvirt,olafhering/libvirt,rmarwaha/libvirt,rmarwaha/libvirt1,zippy2/libvirt,zhlcindy/libvirt-1.1.4-maintain,libvirt/libvirt,datto/libvirt,olafhering/libvirt,bjzhang/libvirt,eskultety/libvirt,jeckersb/libvirt,eskultety/libvirt,taget/libvirt,warewolf/libvirt,cbosdo/libvirt,trainstack/libvirt,shugaoye/libvirt,elmarco/libvirt,cbosdo/libvirt,eskultety/libvirt,nertpinx/libvirt,rlaager/libvirt,emaste/libvirt,VenkatDatta/libvirt,siboulet/libvirt-openvz,rmarwaha/libvirt1,novel/fbsd-libvirt,emaste/libvirt,iam-TJ/libvirt,wiedi/libvirt,agx/libvirt,andreabolognani/libvirt,emaste/libvirt,libvirt/libvirt,jfehlig/libvirt,warewolf/libvirt,rmarwaha/libvirt,shugaoye/libvirt,datto/libvirt,bjzhang/libvirt,datto/libvirt,rmarwaha/libvirt,novel/fbsd-libvirt,wiedi/libvirt,zippy2/libvirt,jeckersb/libvirt,rlaager/libvirt,crobinso/libvirt,zhlcindy/libvirt-1.1.4-maintain,iam-TJ/libvirt,VenkatDatta/libvirt,iam-TJ/libvirt,eskultety/libvirt,warewolf/libvirt,andreabolognani/libvirt,agx/libvirt,rmarwaha/libvirt1,jfehlig/libvirt,rmarwaha/libvirt,jfehlig/libvirt,elmarco/libvirt,novel/fbsd-libvirt,VenkatDatta/libvirt,trainstack/libvirt,novel/fbsd-libvirt,emaste/libvirt,fabianfreyer/libvirt,warewolf/libvirt,nertpinx/libvirt,bjzhang/libvirt,datto/libvirt,crobinso/libvirt,eskultety/libvirt,iam-TJ/libvirt,olafhering/libvirt,rmarwaha/libvirt1,jeckersb/libvirt,nertpinx/libvirt,nertpinx/libvirt,dumbbell/libvirt,rmarwaha/libvirt,jeckersb/libvirt,novel/fbsd-libvirt,jeckersb/libvirt,dumbbell/libvirt,siboulet/libvirt-openvz