clearer error message when interface name to long

Signed-off-by: Tomas Pospisek <tpo_deb@sourcepole.ch>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
This commit is contained in:
Daniel Lezcano 2012-10-31 17:15:25 +01:00
parent a24c5a40dc
commit 5480b13b1c

View File

@ -214,7 +214,8 @@ static struct lxc_netdev *network_netdev(const char *key, const char *value,
static int network_ifname(char **valuep, char *value)
{
if (strlen(value) >= IFNAMSIZ) {
ERROR("invalid interface name: %s", value);
ERROR("interface name '%s' too long (>%d)\n",
value, IFNAMSIZ - 1);
return -1;
}