util: properly save/restore original vlan tag for VFs
util: properly save/restore original vlan tag for VFs

When a network device that is a VF of an SR-IOV card was assigned to a
guest using <interface type='hostdev'>, only the MAC address was being
saved/restored, but the VLAN tag was left untouched. Up to now we
haven't actually used vlan tags on SR-IOV devices, so the guest would
have used whatever was set, and left it the same at the end.

The patch following this one will hook up the <vlan> element from the
interface config, so save/restore of the device state needs to also
include the vlan tag.

MAC address is being saved as a simple ASCII string in a file named
for the device under /var/run.  The VLAN tag is now just added at the
end of that file, after a newline. It might be nicer if the file was
XML (in case it ever gets more complicated) but at the moment there's
nothing else on the horizon, and this makes backward compatibility
easier.

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