We currently use EEXIST to represent both a device that is already
attached and for GRE devices that are the same as another one.
Instead use EBUSY for already attached devices to disambiguate the
two situations.
vport = vport_locate(vport_config->devname);
if (vport) {
- err = -EEXIST;
+ err = -EBUSY;
goto out;
}
}
err = netdev_vport_do_ioctl(ODP_VPORT_ADD, &ova);
- if (err == EEXIST) {
+ if (err == EBUSY) {
VLOG_WARN("%s: destroying existing device", name);
err = netdev_vport_do_ioctl(ODP_VPORT_DEL, ova.devname);
ova.config = (char *)peer;
err = netdev_vport_do_ioctl(ODP_VPORT_ADD, &ova);
- if (err == EEXIST) {
+ if (err == EBUSY) {
VLOG_WARN("%s: destroying existing device", name);
err = netdev_vport_do_ioctl(ODP_VPORT_DEL, ova.devname);