fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * CDDL HEADER START
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * The contents of this file are subject to the terms of the
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Common Development and Distribution License (the "License").
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * You may not use this file except in compliance with the License.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * See the License for the specific language governing permissions
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * and limitations under the License.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * When distributing Covered Code, include this CDDL HEADER in each
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * If applicable, add the following below this CDDL HEADER, with the
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * fields enclosed by brackets "[]" replaced with your own identifying
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * information: Portions Copyright [yyyy] [name of copyright owner]
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * CDDL HEADER END
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Use is subject to license terms.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/*LINTLIBRARY*/
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Administration program for SENA
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * subsystems and individual FC_AL devices.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * I18N message number ranges
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * This file: 2000 - 2999
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Shared common messages: 1 - 1999
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* #define _POSIX_SOURCE 1 */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * These defines are used to map instance number from sf minor node.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * They are copied from SF_INST_SHIFT4MINOR and SF_MINOR2INST in sfvar.h.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * sfvar.h is not clean for userland use.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * When it is cleaned up, these defines will be removed and sfvar.h
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * will be included in luxadm.h header file.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define LUX_SF_MINOR2INST(x) (x >> LUX_SF_INST_SHIFT4MINOR)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* Includes */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* Global variables */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortechar *dtype[16]; /* setting a global for later use. */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Given a pointer to a character array, print the character array.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * the character array will not necesarily be NULL terminated.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * size - the max number of characters to print
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * fill_flag - flag when set fills all NULL characters with spaces
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteprint_chars(uchar_t *buffer, int size, int fill_flag)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (i = 0; i < size; i++) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Name : memstrstr
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Input : pointer to buf1, pointer to buf2, size of buf1, size of buf2
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Pointer to start of contents-of-buf2 in buf1 if it is found
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * NULL if buf1 does not contain contents of buf2
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * This function works similar to strstr(). The difference is that null
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * characters in the buffer are treated like any other character. So, buf1
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * and buf2 can have embedded null characters in them.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic char *
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortememstrstr(char *s1, char *s2, int size1, int size2)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Download host bus adapter FCode to all supported cards.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Specify a directory that holds the FCode files, or
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * it will use the default dir. Each file is dealt to
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * the appropriate function.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * -p prints current versions only, -d specifies a directory to load
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* Find all adapters and print the current FCode version */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* SOCAL (SBus) adapters are not supported on x86 */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte MSGSTR(2215, "\n Searching for FC100/S cards:\n"));
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte MSGSTR(2216, "\n Searching for FC100/P, FC100/2P cards:\n"));
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte retval += q_qlgc_update(Options & PVERBOSE, NULL);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte MSGSTR(2503, "\n Searching for Emulex cards:\n"));
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* Send files to the correct function for loading to the HBA */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte " Location of Fcode not specified.\n"));
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte } else if (verbose) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "%s: lstat() failed - %s\n"),
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte MSGSTR(2218, "Error: %s is not a directory.\n"), dir);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "Error: open() failed to open file "
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * We should just issue an error message and
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * make an attempt on the next file,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * and the open error is still an error
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * so the retval should be incremented
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* check to see if this is an emulex fcode */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte sizeof (manf)) == 0) &&
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "\nError: %s is not a valid Fcode "
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Definition of getaction() routine which does keyword parsing
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Operation: A character string containing the ascii cmd to be
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * parsed is passed in along with an array of structures.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * The 1st struct element is a recognizable cmd string, the second
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * is the minimum number of characters from the start of this string
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * to succeed on a match. For example, { "offline", 3, ONLINE }
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * will match "off", "offli", "offline", but not "of" nor "offlinebarf"
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * The third element is the {usually but not necessarily unique}
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * integer to return on a successful match. Note: compares are cAsE insensitive.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * To change, extend or use this utility, just add or remove appropriate
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * lines in the structure initializer below and in the #define s for the
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * return values.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Do not change the minimum number of characters to produce
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * a match as someone may be building scripts that use this
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte char *match; /* Character String to match against */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte int num_match; /* Minimum chars to produce a match */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* hotplugging device operations */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* hotplugging bus operations */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* hotplugging "helper" subcommands */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic const int EOK = 0; /* errno.h type success return code */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * function getaction() takes a character string, cmd, and
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * tries to match it against a passed structure of known cmd
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * character strings. If a match is found, corresponding code
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * is returned in retval. Status returns as follows:
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * EOK = Match found, look for cmd's code in retval
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * EFAULT = One of passed parameters was bad
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * EINVAL = cmd did not match any in list
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortegetaction(char *cmd, struct keyword *matches, int *retval)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* Idiot checking of pointers */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte ! (actlen = strlen(cmd))) /* Is there an cmd ? */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* Keep looping until NULL match string (end of list) */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Precedence: Make sure target is no longer than
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * current match string
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * and target is at least as long as
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * minimum # match chars,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * then do case insensitive match
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * based on actual target size
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* can't get strncasecmp to work on SCR4 */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* (strncasecmp(matches->match, cmd, actlen) == 0) */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte *retval = matches->ret_code; /* Found our match */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte } /* End of matches loop */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte} /* End of getaction() */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* main functions. */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteregister int c;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* getopt varbs */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern char *optarg;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Enable locale announcement
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte switch (c) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* Note: getopt prints an error if invalid option */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte } /* End of switch(c) */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte setbuf(stdout, NULL); /* set stdout unbuffered. */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Build any i18n global variables
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte dtype[7] = MSGSTR(2199, "Optical memory device");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte dtype[8] = MSGSTR(2200, "Medium changer device");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte dtype[9] = MSGSTR(2201, "Communications device");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte dtype[12] = MSGSTR(2202, "Array controller device");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Get subcommand.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if ((getaction(argv[optind], Keywords, &cmd)) == EOK) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte (cmd != INSERT_DEVICE) && (cmd != SYSDUMP) && (cmd != AU) &&
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte (cmd != PORT) && (cmd != CREATE_FAB) && (optind >= argc)) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "Error: enclosure or pathname not specified.\n"));
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* Extract & Save subcommand options */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte while ((c = getopt(argc, argv, optstring)) != EOF) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte switch (c) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* Note: getopt prints an error if invalid option */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte } /* End of switch(c) */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "Error: enclosure or pathname not specified.\n"));
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Check if the file supplied with the -f option is valid
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Some sub commands (bypass for example) use the -f option
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * for other reasons. In such cases, "file_name" should be
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if ((file_name != NULL) && (Options & OPTION_F)) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if ((temp_fd = open(file_name, O_RDONLY)) == -1) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* Determine which mode to operate in (FC-HBA or original) */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte OPTION_P | OPTION_V | OPTION_L | OPTION_E | OPTION_T)) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* Display object(s) */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte exit_code = fchba_display_config(&argv[path_index],
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte exit_code = adm_display_config(&argv[path_index]);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * A special check just in case someone entered
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * any characters after the -p or the probe.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * (I know, a nit.)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (((Options & PVERBOSE) && (Options & OPTION_P) &&
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte (!(Options & PVERBOSE) && (Options & OPTION_P) &&
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte ((Options & PVERBOSE) && (!(Options & OPTION_P)) &&
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte (!(Options & PVERBOSE) && (!(Options & OPTION_P)) &&
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte MSGSTR(114, "Error: Incorrect number of arguments.\n"));
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "Usage: %s [-v] subcommand [option]\n"), whoami);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte case FCODE_UPDATE: /* Update Fcode in all cards */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte !((Options & OPTION_P) && (Options & OPTION_D)))) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (adm_fcode(Options & PVERBOSE, file_name) != 0) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte case QLGC_UPDATE: /* Update Fcode in PCI HBA card(s) */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (q_qlgc_update(Options & PVERBOSE, file_name) != 0) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte case FCAL_UPDATE: /* Update Fcode in Sbus soc+ card */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte exit_code = fcal_update(Options & PVERBOSE, file_name);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte case SET_BOOT_DEV: /* Set boot-device variable in nvram */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* Just stat the argument and make sure it exists */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte VERBPRINT(MSGSTR(2210, " Canceling Reservation for:\n %s\n"),
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* Just stat the argument and make sure it exists */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * EXPERT commands.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (!(Options & EXPERT) || (Options & ~(PVERBOSE | EXPERT))) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (!(Options & EXPERT) || (Options & ~(PVERBOSE | EXPERT |
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte OPTION_R)) || !(Options & (OPTION_A | OPTION_B)) ||
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte ((Options & OPTION_A) && (Options & OPTION_B))) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (!(Options & EXPERT) || (Options & ~(PVERBOSE | EXPERT |
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte OPTION_R)) || !(Options & (OPTION_A | OPTION_B)) ||
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte ((Options & OPTION_A) && (Options & OPTION_B))) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (!(Options & EXPERT) || (Options & ~(PVERBOSE | EXPERT))) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte exit_code = adm_port_offline_online(&argv[path_index],
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (!(Options & EXPERT) || (Options & ~(PVERBOSE | EXPERT))) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte exit_code = adm_port_offline_online(&argv[path_index],
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (!(Options & EXPERT) || (Options & ~(PVERBOSE | EXPERT))) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte exit_code = fchba_display_link_status(&argv[path_index]);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Undocumented commands.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (!(Options & EXPERT) || (Options & ~(PVERBOSE | EXPERT))) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (!(Options & EXPERT) || (Options & ~(PVERBOSE | EXPERT))) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (!(Options & EXPERT) || (Options & ~(PVERBOSE | EXPERT))) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte exit_code = fchba_display_port(Options & PVERBOSE);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte exit_code = adm_display_port(Options & PVERBOSE);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (!(Options & EXPERT) || (Options & ~(PVERBOSE | EXPERT))) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (adm_port_loopback(argv[path_index], EXT_LOOPBACK) < 0) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (!(Options & EXPERT) || (Options & ~(PVERBOSE | EXPERT))) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (adm_port_loopback(argv[path_index], INT_LOOPBACK) < 0) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (!(Options & EXPERT) || (Options & ~(PVERBOSE | EXPERT))) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (adm_port_loopback(argv[path_index], NO_LOOPBACK) < 0) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (err = hotplug(REMOVE_DEVICE, &argv[path_index],
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* for hotplug device operations */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (!(Options & EXPERT) || (Options & ~(PVERBOSE | EXPERT))) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte Options & PVERBOSE, Options & OPTION_CAPF) != 0) {