Don't fail when it wasn't possible to fetch the interface name.
On some systems SIOCGIFNAME may fail with ENOTTY, but the actual
slcanX interface gets properly configured. Instead of crashing hard
on such case, let's gracefuly degrade and just not display the
interface name.
This is the issue I mentioned in https://github.com/linux-can/can-utils/pull/118
On which systems do you see the ioctl() to fail?
It's Android. I've built the kernel (4.4) by myself, so there is a chance I misconfigured something.
It's clearly a problem with my system, but it's hard to say if it's tied to Android P or my specific device. I'd appreciate help debugging this, but the patch with workaround has still some value, because any other Android developer may hit the issue at other time.