fd = simc_open("/dev/net/tun", 02, 0); /* O_RDWR */
if (fd < 0) {
- pr_err("Failed to open /dev/net/tun, returned %d (errno = %d)\n",
- fd, errno);
+ pr_err("%s: failed to open /dev/net/tun, returned %d (errno = %d)\n",
+ lp->dev->name, fd, errno);
return fd;
}
err = simc_ioctl(fd, TUNSETIFF, &ifr);
if (err < 0) {
- pr_err("Failed to set interface, returned %d (errno = %d)\n",
- err, errno);
+ pr_err("%s: failed to set interface %s, returned %d (errno = %d)\n",
+ lp->dev->name, dev_name, err, errno);
simc_close(fd);
return err;
}
if (*init == ',') {
rem = split_if_spec(init + 1, &mac_str, &dev_name);
if (rem != NULL) {
- pr_err("Extra garbage on specification : '%s'\n", rem);
+ pr_err("%s: extra garbage on specification : '%s'\n",
+ dev->name, rem);
return 0;
}
} else if (*init != '\0') {
- pr_err("Invalid argument: %s. Skipping device!\n", init);
+ pr_err("%s: invalid argument: %s. Skipping device!\n",
+ dev->name, init);
return 0;
}
lp->tp.protocol = tuntap_protocol;
lp->tp.poll = tuntap_poll;
- pr_info("TUN/TAP backend -\n");
-
return 1;
}
} else {
netif_start_queue(dev);
- pr_err("iss_net_start_xmit: failed(%d)\n", len);
+ pr_err("%s: %s failed(%d)\n", dev->name, __func__, len);
}
spin_unlock_irqrestore(&lp->lock, flags);
*/
if (!tuntap_probe(lp, index, init)) {
- pr_err("Invalid arguments. Skipping device!\n");
+ pr_err("%s: invalid arguments. Skipping device!\n",
+ dev->name);
goto errout;
}
rtnl_unlock();
if (err) {
- pr_err("Error registering net device!\n");
+ pr_err("%s: error registering net device!\n", dev->name);
/* XXX: should we call ->remove() here? */
free_netdev(dev);
return 1;