Changeset View
Changeset View
Standalone View
Standalone View
sbin/ifconfig/ifconfig.c
| Show First 20 Lines • Show All 469 Lines • ▼ Show 20 Lines | args_parse(struct ifconfig_args *args, int argc, char *argv[]) | ||||
| char options[1024]; | char options[1024]; | ||||
| struct option *p; | struct option *p; | ||||
| #ifdef JAIL | #ifdef JAIL | ||||
| int jid; | int jid; | ||||
| #endif | #endif | ||||
| int c; | int c; | ||||
| /* Parse leading line options */ | /* Parse leading line options */ | ||||
| strlcpy(options, "G:adDf:j:klmnuv", sizeof(options)); | strlcpy(options, "G:adDf:j:klmnuv", sizeof(options)); | ||||
marius: I don't particularly like the idea of adding "-s" (no real association with the VF status in… | |||||
Not Done Inline ActionsMy thought was that verbose might get too verbose with both SFP data and this info in it -- especially if you decide to add 128 VFs to a single port, which is currently possible on ixl. That said, I did this because I was experimenting to see what I could get away with in terms of editing ifconfig. I don't mind removing the option if this patch ends up being something that people seriously want. erj: My thought was that verbose might get too verbose with both SFP data and this info in it… | |||||
Not Done Inline ActionsWell, with 128 VFs on a single port, the 4 lines of SFP status at the verbosity level of 1 hardly should make it too verbose and at higher verbosity levels, the user really is asking for more output. But okay, let's see what others think. marius: Well, with 128 VFs on a single port, the 4 lines of SFP status at the verbosity level of 1… | |||||
| for (p = opts; p != NULL; p = p->next) | for (p = opts; p != NULL; p = p->next) | ||||
| strlcat(options, p->opt, sizeof(options)); | strlcat(options, p->opt, sizeof(options)); | ||||
| while ((c = getopt(argc, argv, options)) != -1) { | while ((c = getopt(argc, argv, options)) != -1) { | ||||
| switch (c) { | switch (c) { | ||||
| case 'a': /* scan all interfaces */ | case 'a': /* scan all interfaces */ | ||||
| args->all = true; | args->all = true; | ||||
| break; | break; | ||||
| case 'd': /* restrict scan to "down" interfaces */ | case 'd': /* restrict scan to "down" interfaces */ | ||||
| ▲ Show 20 Lines • Show All 1,399 Lines • ▼ Show 20 Lines | #if 0 | ||||
| } | } | ||||
| #endif | #endif | ||||
| if (allfamilies) | if (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->verbose > 0) | if (args->verbose > 0) | ||||
| sfp_status(ctx); | sfp_status(ctx); | ||||
| close(s); | close(s); | ||||
| ctx->io_s = old_s; | ctx->io_s = old_s; | ||||
| return; | return; | ||||
| } | } | ||||
| #endif | #endif | ||||
| ▲ Show 20 Lines • Show All 281 Lines • Show Last 20 Lines | |||||
I don't particularly like the idea of adding "-s" (no real association with the VF status in particular) or actually adding any additional option for this; what's wrong with just adding the VF status to the verbose ("-v") information akin to the SFP data?