Commit 5480b13b by Daniel Lezcano

clearer error message when interface name to long

parent a24c5a40
...@@ -214,7 +214,8 @@ static struct lxc_netdev *network_netdev(const char *key, const char *value, ...@@ -214,7 +214,8 @@ static struct lxc_netdev *network_netdev(const char *key, const char *value,
static int network_ifname(char **valuep, char *value) static int network_ifname(char **valuep, char *value)
{ {
if (strlen(value) >= IFNAMSIZ) { if (strlen(value) >= IFNAMSIZ) {
ERROR("invalid interface name: %s", value); ERROR("interface name '%s' too long (>%d)\n",
value, IFNAMSIZ - 1);
return -1; return -1;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment