]> git.ipfire.org Git - thirdparty/libvirt.git/commit
virsh: Make --type argument of detach-interface optional master
authorMichal Privoznik <mprivozn@redhat.com>
Thu, 18 Jun 2026 07:53:09 +0000 (09:53 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Thu, 18 Jun 2026 12:11:51 +0000 (14:11 +0200)
commit2c8d914b8169eea4133d9f5f240b987161b5e65c
tree36a1c2c6603f0d9e786f6a98c0ddc68de749177a
parentb1e01a18aa945a5a39b67139f49d57a55f4cecf5
virsh: Make --type argument of detach-interface optional

The detach-interface virsh command requires domain (obviously)
and --type to identify <interface/>. Optionally, --mac can be
provided to chose from multiple interfaces. Well, that renders
--type argument redundant. I mean, if there are but unique MACs
within domain XML, then interface type is implied. If there are
duplicate MACs then --type can help to differentiate, though at
that point detach-device seems like a better fit.

Long story short, make --type optional.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
docs/manpages/virsh.rst
tools/virsh-domain.c