2N/A * The contents of this file are subject to the terms of the 2N/A * Common Development and Distribution License (the "License"). 2N/A * You may not use this file except in compliance with the License. 2N/A * See the License for the specific language governing permissions 2N/A * and limitations under the License. 2N/A * When distributing Covered Code, include this CDDL HEADER in each 2N/A * If applicable, add the following below this CDDL HEADER, with the 2N/A * fields enclosed by brackets "[]" replaced with your own identifying 2N/A * information: Portions Copyright [yyyy] [name of copyright owner] 2N/A * Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved. 2N/A * Internal routine for setting both _ue_errno and _ue_errmsg. We save 2N/A * and restore the UNIX errno across this routing so the caller can use either 2N/A * libscsi_set_errno(), libscsi_error(), or libscsi_verror() without this value 2N/A * To allow the existing error message to itself be used in an error 2N/A * message, we put the new error message into a buffer on the stack, 2N/A * and then copy it into lsh_errmsg. We also need to set the errno, 2N/A * but because the call to libscsi_set_errno() is destructive to 2N/A * lsh_errmsg, we do this after we print into our temporary buffer 2N/A * (in case _libscsi_errmsg is part of the error message) and before we 2N/A * copy the temporary buffer on to _libscsi_errmsg (to prevent our new 2N/A * message from being nuked by the call to libscsi_set_errno()). 2N/A "unknown or unsupported command %u",
cmd);
2N/A * As part of basic initialization, we always retrieve the INQUIRY information