Changeset View
Changeset View
Standalone View
Standalone View
sbin/ifconfig/ifconfig_netlink.c
| Show First 20 Lines • Show All 408 Lines • ▼ Show 20 Lines | status_nl(if_ctx *ctx, struct iface *iface) | ||||
| /* TODO: convert to netlink */ | /* TODO: convert to netlink */ | ||||
| if (args->allfamilies) | if (args->allfamilies) | ||||
| af_other_status(ctx); | af_other_status(ctx); | ||||
| else if (args->afp->af_other_status != NULL) | else if (args->afp->af_other_status != NULL) | ||||
| args->afp->af_other_status(ctx); | args->afp->af_other_status(ctx); | ||||
| print_ifstatus(ctx); | print_ifstatus(ctx); | ||||
| if (args->verbose > 0) | |||||
| vf_status(ctx); | |||||
| if (args->drivername || args->verbose) { | if (args->drivername || args->verbose) { | ||||
| if (ifconfig_get_orig_name(lifh, link->ifla_ifname, | if (ifconfig_get_orig_name(lifh, link->ifla_ifname, | ||||
| &drivername) != 0) { | &drivername) != 0) { | ||||
| if (ifconfig_err_errtype(lifh) == OTHER) | if (ifconfig_err_errtype(lifh) == OTHER) | ||||
| fprintf(stderr, "get original name: %s\n", | fprintf(stderr, "get original name: %s\n", | ||||
| strerror(ifconfig_err_errno(lifh))); | strerror(ifconfig_err_errno(lifh))); | ||||
| else | else | ||||
| fprintf(stderr, | fprintf(stderr, | ||||
| ▲ Show 20 Lines • Show All 62 Lines • ▼ Show 20 Lines | else | ||||
| ifconfig_ioctl(ctx, 0, args->afp); | ifconfig_ioctl(ctx, 0, args->afp); | ||||
| } | } | ||||
| if (args->namesonly) | if (args->namesonly) | ||||
| printf("\n"); | printf("\n"); | ||||
| close(ctx->io_s); | close(ctx->io_s); | ||||
| snl_free(&ss); | snl_free(&ss); | ||||
| } | } | ||||