rvlan: use "operstate" rather than "carrier" for device status.
The problem with /sys/net/*/carrier, is that the file may be missing.
For example, if the fiber is unplugged. "operstate" is always there,
and it is either "up" or "down". If it is ifconfig'd up but without fiber,
the operstate is properly down, so we can use it with no further ado.
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
Showing
Please
register
or
sign in
to comment