Cleanup fcntl(3) usage and fd lifetimes in vmd(8).
authordv <dv@openbsd.org>
Mon, 5 Feb 2024 21:58:09 +0000 (21:58 +0000)
committerdv <dv@openbsd.org>
Mon, 5 Feb 2024 21:58:09 +0000 (21:58 +0000)
commitb3bc6112e4995b349a3e1f5ce822ae93ed9b5245
treef9f2f0e8a2368bcae827af90d54d912a66d3a07d
parent127eff5299a470861fd708ca4b7bb06e5dff170d
Cleanup fcntl(3) usage and fd lifetimes in vmd(8).

Remove extraneous fcntl(3) usage for setting fd features that can
be set at time of open(2), pipe2(2), or socketpair(2). Also cleans
up pty creation switching to using functions from libutil instead
of direct ioctl(2) calls.

ok mlarkin@, original diff ok claudio@ as well.
usr.sbin/vmd/config.c
usr.sbin/vmd/vioblk.c
usr.sbin/vmd/vionet.c
usr.sbin/vmd/virtio.c
usr.sbin/vmd/vm.c
usr.sbin/vmd/vmd.c
usr.sbin/vmd/vmm.c