qemu: Rewrite LOOKUP_PTYS macro into a function
qemu: Rewrite LOOKUP_PTYS macro into a function

The macro is huge and gives us nothing but headache when maintaining it.

foomango/libvirt,novel/fbsd-libvirt,olafhering/libvirt,rmarwaha/libvirt1,emaste/libvirt,rlaager/libvirt,andreabolognani/libvirt,fabianfreyer/libvirt,taget/libvirt,rlaager/libvirt,datto/libvirt,zhlcindy/libvirt-1.1.4-maintain,olafhering/libvirt,zippy2/libvirt,eskultety/libvirt,rmarwaha/libvirt1,eskultety/libvirt,foomango/libvirt,rmarwaha/libvirt1,rmarwaha/libvirt,andreabolognani/libvirt,emaste/libvirt,warewolf/libvirt,jeckersb/libvirt,trainstack/libvirt,cbosdo/libvirt,trainstack/libvirt,agx/libvirt,jeckersb/libvirt,jfehlig/libvirt,elmarco/libvirt,jfehlig/libvirt,danwent/libvirt-ovs,nertpinx/libvirt,taget/libvirt,soulxu/libvirt-xuhj,leilihh/libvirt,nertpinx/libvirt,danwent/libvirt-ovs,jardasgit/libvirt,trainstack/libvirt,dumbbell/libvirt,libvirt/libvirt,VenkatDatta/libvirt,novel/fbsd-libvirt,kantai/libvirt-vfork,andreabolognani/libvirt,wiedi/libvirt,zhlcindy/libvirt-1.1.4-maintain,siboulet/libvirt-openvz,cbosdo/libvirt,elmarco/libvirt,rbu/libvirt,iam-TJ/libvirt,shugaoye/libvirt,fabianfreyer/libvirt,foomango/libvirt,rmarwaha/libvirt1,usc-isi/libvirt,rmarwaha/libvirt1,jeckersb/libvirt,foomango/libvirt,taget/libvirt,iam-TJ/libvirt,dumbbell/libvirt,taget/libvirt,wiedi/libvirt,jeckersb/libvirt,siboulet/libvirt-openvz,taget/libvirt,cbosdo/libvirt,fabianfreyer/libvirt,fabianfreyer/libvirt,wiedi/libvirt,warewolf/libvirt,nertpinx/libvirt,crobinso/libvirt,crobinso/libvirt,kantai/libvirt-vfork,novel/fbsd-libvirt,elmarco/libvirt,novel/fbsd-libvirt,shugaoye/libvirt,jardasgit/libvirt,VenkatDatta/libvirt,bjzhang/libvirt,usc-isi/libvirt,emaste/libvirt,bjzhang/libvirt,jfehlig/libvirt,bjzhang/libvirt,rmarwaha/libvirt,zhlcindy/libvirt-1.1.4-maintain,elmarco/libvirt,shugaoye/libvirt,soulxu/libvirt-xuhj,olafhering/libvirt,iam-TJ/libvirt,usc-isi/libvirt,andreabolognani/libvirt,eskultety/libvirt,rbu/libvirt,wiedi/libvirt,crobinso/libvirt,libvirt/libvirt,emaste/libvirt,leilihh/libvirt,wiedi/libvirt,jfehlig/libvirt,danwent/libvirt-ovs,zhlcindy/libvirt-1.1.4-maintain,leilihh/libvirt,jardasgit/libvirt,siboulet/libvirt-openvz,wiedi/libvirt,leilihh/libvirt,trainstack/libvirt,emaste/libvirt,VenkatDatta/libvirt,rbu/libvirt,dumbbell/libvirt,rmarwaha/libvirt,eskultety/libvirt,rbu/libvirt,soulxu/libvirt-xuhj,siboulet/libvirt-openvz,warewolf/libvirt,rmarwaha/libvirt,novel/fbsd-libvirt,zhlcindy/libvirt-1.1.4-maintain,eskultety/libvirt,kantai/libvirt-vfork,emaste/libvirt,usc-isi/libvirt,trainstack/libvirt,zippy2/libvirt,warewolf/libvirt,cbosdo/libvirt,datto/libvirt,kantai/libvirt-vfork,zippy2/libvirt,olafhering/libvirt,novel/fbsd-libvirt,libvirt/libvirt,rmarwaha/libvirt1,datto/libvirt,crobinso/libvirt,emaste/libvirt,agx/libvirt,siboulet/libvirt-openvz,soulxu/libvirt-xuhj,rmarwaha/libvirt,danwent/libvirt-ovs,novel/fbsd-libvirt,danwent/libvirt-ovs,novel/fbsd-libvirt,agx/libvirt,elmarco/libvirt,rmarwaha/libvirt,datto/libvirt,libvirt/libvirt,trainstack/libvirt,agx/libvirt,jardasgit/libvirt,warewolf/libvirt,wiedi/libvirt,zippy2/libvirt,jeckersb/libvirt,iam-TJ/libvirt,rlaager/libvirt,iam-TJ/libvirt,datto/libvirt,rlaager/libvirt,leilihh/libvirt,dumbbell/libvirt,warewolf/libvirt,fabianfreyer/libvirt,andreabolognani/libvirt,cbosdo/libvirt,VenkatDatta/libvirt,jeckersb/libvirt,shugaoye/libvirt,usc-isi/libvirt,iam-TJ/libvirt,nertpinx/libvirt,leilihh/libvirt,rlaager/libvirt,foomango/libvirt,iam-TJ/libvirt,warewolf/libvirt,trainstack/libvirt,jeckersb/libvirt,VenkatDatta/libvirt,bjzhang/libvirt,kantai/libvirt-vfork,shugaoye/libvirt,soulxu/libvirt-xuhj,dumbbell/libvirt,novel/fbsd-libvirt,nertpinx/libvirt,rbu/libvirt,jardasgit/libvirt,bjzhang/libvirt,agx/libvirt,dumbbell/libvirt