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) 2009, 2012, Oracle and/or its affiliates. All rights reserved. 2N/A * This file's functions are responsible for all store and retrieve operations 2N/A * against the STMF smf(5) database. The following shows the currently defined 2N/A * schema for the STMF database: 2N/A * Stability: Volatile 2N/A * 1. Property Group: host_groups 2N/A * Properties: group_name-<N> where <N> is an unsigned integer 2N/A * contains: group name 2N/A * group_name-<N>-member_list where <N> is an unsigned 2N/A * integer matching a group_name-<N> property. 2N/A * contains: list of members 2N/A * Contains the host group names as well as the host group members 2N/A * for each host group. 2N/A * 2. Property Group: target_groups 2N/A * Properties: group_name-<N> where <N> is an unsigned integer 2N/A * contains: group name 2N/A * group_name-<N>-member_list where <N> is an unsigned 2N/A * integer matching a group_name-<N> property. 2N/A * contains: list of members 2N/A * Contains the target group names as well as the target group 2N/A * members for each target group. 2N/A * 3. Property Group: lu-<GUID> 2N/A * where <GUID> is a 32 character hexadecimal string. 2N/A * Properties: ve_cnt 2N/A * contains: the number of current view entries 2N/A * view-entry-<N>-<GUID> where <N> is an unsigned integer 2N/A * contains: nothing. Used as reference to the view 2N/A * entry property group 2N/A * Contains the references to each view entry. One lu-<GUID> 2N/A * property group will exist for each logical unit with 1 or more 2N/A * Potentially can hold any other data that can be managed on a per 2N/A * logical unit basis. 2N/A * 4. Property Group: view_entry-<N>-<GUID> (matches property in lu-<GUID> 2N/A * Properties: all_hosts 2N/A * contains: when true, the value of host_group is 2N/A * contains: when true, the value of target_group is 2N/A * contains: host group for logical unit mapping and 2N/A * contains: target group for logical unit mapping and 2N/A * contains: the 8-byte SCSI logical unit number for 2N/A * mapping and masking purposes 2N/A * One "view_entry-<N>-<GUID>" property group will exist for each 2N/A * view entry in the system. This property group name maps 2N/A * directly to the "lu-<GUID>" property group with a matching 2N/A * 5. Property Group: provider_data_pg_<provider-name> 2N/A * where <provider-name> is the name of the provider 2N/A * registered with stmf. 2N/A * Properties: provider_data_prop-<N> 2N/A * where <N> is a sequential identifier for the data 2N/A * contains: up to STMF_PROVIDER_DATA_PROP_SIZE bytes 2N/A * of nvlist packed data. 2N/A * provider_data_count 2N/A * contains: the number of provider data chunks 2N/A * provider_data_type 2N/A * contains: STMF_PORT_PROVIDER_TYPE or 2N/A * STMF_LU_PROVIDER_TYPE 2N/A * Holds the nvlist packed provider data set via 2N/A * stmfSetProviderData and retrieved via stmfGetProviderData. Data 2N/A * is stored in STMF_PROVIDER_DATA_PROP_SIZE chunks. On retrieve, 2N/A * these chunks are reassembled and unpacked. 2N/A * Version info for the SMF schema 2N/A * Note: Do not change these property names and size values. 2N/A * They represent fields in the persistent config and once modified 2N/A * will have a nasty side effect of invalidating the existing store. 2N/A * If you do need to change them, you'll need to use the versioning above 2N/A * to retain backward compatiblity with the previous configuration schema. 2N/A/* BEGIN STORE PROPERTY DEFINITIONS */ 2N/A * Property Group Names and prefixes 2N/A * Property names and prefix for logical unit property group 2N/A/* Property names for stmf properties */ 2N/A * Property names for view entry 2N/A/* Property group suffix for provider data */ 2N/A/* END STORE PROPERTY DEFINITIONS */ 2N/A/* limits and flag values */ 2N/A * Catch the signal and set the global signalsCaught to the signal received 2N/A * signalsCaught will be used by releaseSignal to raise this signal when 2N/A * we're done processing our critical code. 2N/A * iPsAddRemoveGroupMember 2N/A * Add or remove a member for a given group 2N/A * pgName - Property group name 2N/A * STMF_PS_SUCCESS on success 2N/A * STMF_PS_ERROR_* on failure 2N/A * Init the service handle 2N/A * Allocate scf resources 2N/A * Get the service property group handle 2N/A * Begin the transaction 2N/A * We're changing an existing property by adding a propval 2N/A * There are no add semantics in libscf for a property value. We'll 2N/A * need to read in the current properties and apply them all to the 2N/A * set and then add the one we were asked to add or omit the one 2N/A * we were asked to remove. 2N/A * Get the property handle 2N/A * Value lookup is used to lookup the existing values 2N/A * valueIter is the iterator handle, create the resource 2N/A * Allocate value resource pointers. 2N/A * We need a value resource for each value as value pointers passed 2N/A * to libscf cannot be destroyed until the commit or destroy on the 2N/A * transaction is done. 2N/A * We're using GROUP_MEMBER_ALLOC initially. If it's not large 2N/A * enough, we'll realloc on the fly 2N/A * Iterate through the existing values 2N/A * Check for existing 2N/A * If we're adding, it's an error 2N/A * If we're removing, we skip it and simply not 2N/A * add it to the set. Subtraction by omission. 2N/A * Create the value resource for this iteration 2N/A * realloc if we've hit the previous alloc size 2N/A * set valueArraySize to final allocated length 2N/A * so we can use it to destroy the resources correctly 2N/A * If we're adding, we have one more step. Add the member to the 2N/A * Now create the new entry 2N/A * Set the new member name 2N/A * Add the new member 2N/A * Yes, we're finally done. We actually added or removed one entry 2N/A * Free valueSet scf resources 2N/A * Now free the pointer array to the resources 2N/A * iPsAddRemoveLuViewEntry 2N/A * Adds or removes a view entry name property for a given logical unit 2N/A * property group. There is one logical unit property group for every logical 2N/A * unit that has one or more associated view entries. 2N/A * luPgName - Property group name of logical unit 2N/A * viewEntryPgName - Property group name of view entry 2N/A * STMF_PS_SUCCESS on success 2N/A * STMF_PS_ERROR_* on failure 2N/A * Init the service handle 2N/A * Allocate scf resources 2N/A /* get the LU property group */ 2N/A /* if it doesn't exist, create it */ 2N/A /* we need to create the VE_CNT property */ 2N/A * Begin the transaction 2N/A * Create the STMF_VE_CNT property. This will keep the current 2N/A * total view entries for this logical unit. 2N/A "transaction property new %s/%s " 2N/A * The STMF_VE_CNT property already exists. Just update 2N/A * Get the STMF_VE_CNT property 2N/A * Get the STMF_VE_CNT value 2N/A * Now get the actual value from the value handle 2N/A * Reset the value resource as it is used below 2N/A /* Check if this is the last one being removed */ 2N/A * Delete the pg and get out if this is the last 2N/A * Set the view entry count 2N/A * Add the value to the transaction entry 2N/A * Create a transaction entry resource for the view entry name 2N/A * If adding, create a property with the view entry name 2N/A "transaction property new %s/%s " 2N/A * If removing, delete the existing property with the view 2N/A "transaction property delete %s/%s " 2N/A * Commit property transaction 2N/A * Add a view entry property group and optionally, a logical unit property 2N/A * group if it does not exist. 2N/A * luName - ascii hexadecimal logical unit identifier 2N/A * viewEntryName - name of view entry (VIEW_ENTRY_nn) 2N/A * viewEntry - pointer to stmfViewEntry structure 2N/A * Init the service handle 2N/A * Allocate scf resources 2N/A * allocate value and entry resources for scf 2N/A * Create the View Entry property group 2N/A * Add the view entry as properties on the view entry group 2N/A * Begin property update transaction 2N/A * Add allHosts property 2N/A /* Set the allHosts value */ 2N/A * Add the allHosts value to the transaction 2N/A * Create hostGroup property 2N/A * Set the value for hostGroup 2N/A * Add the hostGroup value to the transaction entry 2N/A * Create the allTargets property 2N/A * Set the allTargets value 2N/A * Add the allTargets value to the transaction 2N/A * Create targetGroup property 2N/A * Set the value for targetGroup 2N/A * Add targetGroup value to the transaction 2N/A * Create the luNbr property 2N/A * Add luNbr to the transaction entry 2N/A * Now that we've successfully added the view entry, 2N/A * update the logical unit property group or create 2N/A * it if it does not exist 2N/A * If we did not add the view entry name to the logical unit, 2N/A * make sure we do not commit the transaction 2N/A * Commit property transaction 2N/A * If we did not commit, try to remove the view entry name 2N/A * from the logical unit. 2N/A * If that fails, we're now inconsistent. 2N/A * We are still in an error scenario even though the remove 2N/A * lu view entry succeeded. 2N/A /* if there was an error, delete the created pg if one was created */ 2N/A * Free value and entry scf resources 2N/A * psClearProviderData 2N/A * providerName - name of provider data to clear 2N/A * Allocate scf resources 2N/A * create the property group name 2N/A * delete provider property group 2N/A * iPsCreateDeleteGroup 2N/A * Creates or deletes a group (target or host) 2N/A * When creating a group, two properties are created. One to hold the group 2N/A * name and the other to hold the group members. 2N/A * pgName - Property group name 2N/A * groupName - group name to create 2N/A * STMF_PS_SUCCESS on success 2N/A * STMF_PS_ERROR_* on failure 2N/A * Allocate scf resources 2N/A * Get the property group being modified 2N/A * propIter is the iterator handle 2N/A * Iterate through the group names. 2N/A * If we find it in the list, it's an error when addRemoveFlag == ADD. 2N/A * Skip over member list properties 2N/A * buf1 contains the name for REMOVE 2N/A * If we're adding, we need to create a new property name for the 2N/A "buffer overflow on property name %s",
2N/A * Now create the new member list property for the new group 2N/A * buf1 now contains the name of the property if it was found in the 2N/A * list in the case of delete or the next available property name 2N/A * in the case of create 2N/A * buf2 now contains the member list property name 2N/A * Create the property 'group name' 2N/A * This is the container for the group name 2N/A * Create the property 'group list' 2N/A * This is the container for the group members 2N/A * Delete the property 'group name' 2N/A "transaction property delete %s/%s failed - %s",
2N/A * Delete the property 'group list' 2N/A * pgName - Property group name 2N/A * groupList - pointer to pointer to stmfGroupList structure. On success, 2N/A * contains the list of groups 2N/A * STMF_PS_SUCCESS on success 2N/A * STMF_PS_ERROR_* on failure 2N/A * Allocate scf resources 2N/A * propIter is the iterator handle 2N/A * Skip over member list properties 2N/A * propIter is the iterator handle 2N/A * In order to get a list of groups, simply get all of the 2N/A * properties that are not member list properties, i.e. the group 2N/A * It's possible for this list to grow beyond what was originally 2N/A * read so just ensure we're not writing beyond our allocated buffer 2N/A * by ensuring i < memberCnt 2N/A * Skip over member list properties 2N/A * iPsGetGroupMemberList 2N/A * pgName - Property group name 2N/A * groupName - group name (host group or target group) 2N/A * groupMemberList - pointer to pointer to stmfGroupProperties structure. On 2N/A * success, contains the list of group members 2N/A * STMF_PS_SUCCESS on success 2N/A * STMF_PS_ERROR_* on failure 2N/A * init the service handle 2N/A * Allocate scf resources 2N/A * get the service property group handle 2N/A * Get the property handle 2N/A * based on the target or host group name 2N/A * valueIter is the iterator handle 2N/A * valueIter is the iterator handle 2N/A /* set to default */ 2N/A * get stmf data property group 2N/A /* find persistence property */ 2N/A * Get the persistence property 2N/A /* no persist property found */ 2N/A * If we have no persistType property, go ahead 2N/A * and create it with the user specified value or 2N/A * the default value. 2N/A * Begin the transaction 2N/A * set the persist type 2N/A * add the value to the transaction 2N/A /* reset return value */ 2N/A /* get the persist property */ 2N/A * Get the value of the persist property 2N/A * handle and svc should not be free'd here. They're 2N/A * Init the service handle 2N/A * Allocate scf resources 2N/A * get stmf data property group 2N/A * get the stmf props property, if exists 2N/A /* if stmf prop is not found or while setting the prop */ 2N/A * Begin the transaction 2N/A "transaction property change " 2N/A "%s/%s failed - %s",
2N/A * set stmf prop value 2N/A * add the value to the transaction 2N/A "%s/%s failed - %s",
2N/A * Initialize scf stmf service access 2N/A * handle - returned handle 2N/A * service - returned service handle 2N/A * Both handle and service must be destroyed by the caller 2N/A * Get and check the version number 2N/A /* we only need destroy the scope here */ 2N/A * called by iPsInit only 2N/A * iPsGetServiceVersion 2N/A * get stmf data property group 2N/A /* create the group */ 2N/A * create the property group. 2N/A /* reset return value */ 2N/A /* find version property */ 2N/A * Get the version property 2N/A /* no version property found */ 2N/A * If we have no version property, go ahead 2N/A * and create it. We're obviously making an assumption 2N/A * here that someone did not delete the existing property 2N/A * and that this is the initial set and the initial call 2N/A * If they did delete it, this will simply plant this 2N/A * library's version on this service. That may or may not be 2N/A * correct and we have no way of determining that. 2N/A * Begin the transaction 2N/A "transaction property new %s/%s failed - %s",
2N/A * set the version number 2N/A * add the value to the transaction 2N/A /* reset return value */ 2N/A /* get the version property */ 2N/A * Get the actual value of the view entry count property 2N/A * handle and svc should not be free'd here. They're 2N/A * iPsGetActualGroupName 2N/A * pgName - Property group name 2N/A * groupName - requested group name 2N/A * actualName - actual group name to reference (len must be >= MAXNAMELEN) 2N/A * STMF_PS_SUCCESS on success 2N/A * STMF_PS_ERROR_* on failure 2N/A * Allocate scf resources 2N/A * get group list property group 2N/A * propIter is the iterator handle 2N/A * Iterate through group properties searching for the requested 2N/A * group name. When we find it, we need to get the property name 2N/A * since it refers to the actual group name. 2N/A /* initialize to not found */ 2N/A * Skip over non-member list properties 2N/A * When we find a match, set success and break 2N/A * if we didn't find it, ret is set to STMF_PS_ERROR_GROUP_NOT_FOUND 2N/A * psAddHostGroupMember 2N/A * Add a host group member to a host group, 2N/A * Input: groupName - name of group to which the member is added 2N/A * memberName - name of group member to add 2N/A * psAddTargetGroupMember 2N/A * Add a target port group member to a target group 2N/A * Input: groupName - name of group to which the member is added 2N/A * memberName - name of group member to add. Must be nul terminated. 2N/A * luGuid - logical unit identifier 2N/A * viewEntry - pointer to viewEntry allocated by the caller that contains 2N/A * the values to set for this view entry 2N/A * STMF_PS_SUCCESS on success 2N/A * STMF_PS_ERROR_* on failure 2N/A /* grab the signal hold lock */ 2N/A * hold signals until we're done 2N/A /* Convert to ASCII uppercase hexadecimal string */ 2N/A "%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X",
2N/A * Format of view entry property group name: 2N/A * VE-<view_entry_name>-<lu_name> 2N/A * Okay, we're done. Release the signals 2N/A * Don't set this as an STMF_PS_ERROR_*. We succeeded 2N/A * the requested operation. But we do need to log it. 2N/A /* release the signal hold lock */ 2N/A * Purpose: Checks whether service exists 2N/A * groupName - name of group to create 2N/A * STMF_PS_SUCCESS on success 2N/A * STMF_PS_ERROR_* on failure 2N/A * psCreateTargetGroup 2N/A * groupName - name of group to create 2N/A * STMF_PS_SUCCESS on success 2N/A * STMF_PS_ERROR_* on failure 2N/A * groupName - name of group to delete 2N/A * STMF_PS_SUCCESS on success 2N/A * STMF_PS_ERROR_* on failure 2N/A * psDeleteTargetGroup 2N/A * groupName - name of group to delete 2N/A * STMF_PS_SUCCESS on success 2N/A * STMF_PS_ERROR_* on failure 2N/A * psGetHostGroupList 2N/A * groupList - pointer to pointer to stmfGroupList. Contains the list 2N/A * of host groups on successful return. 2N/A * STMF_PS_SUCCESS on success 2N/A * STMF_PS_ERROR_* on failure 2N/A * psGetLogicalUnitList 2N/A * Allocate scf resources 2N/A * pgIter is the iterator handle 2N/A * Only count LU property groups 2N/A * pgIter is the iterator handle 2N/A * the property groups. Just make sure we don't write beyond our 2N/A * allocated buffer by checking to ensure i < guidCnt. 2N/A * Only use LU property groups 2N/A "%2x%2x%2x%2x%2x%2x%2x%2x%2x%2x%2x%2x%2x%2x%2x%2x",
2N/A * psGetTargetGroupList 2N/A * groupList - pointer to pointer to stmfGroupList. Contains the list 2N/A * of target groups on successful return. 2N/A * STMF_PS_SUCCESS on success 2N/A * STMF_PS_ERROR_* on failure 2N/A * psGetHostGroupMemberList 2N/A * groupName - group name for which to retrieve a member list 2N/A * groupMemberList - pointer to pointer to stmfGroupProperties list 2N/A * STMF_PS_SUCCESS on success 2N/A * STMF_PS_ERROR_* on failure 2N/A * psGetTargetGroupMemberList 2N/A * groupName - group name for which to retrieve a member list 2N/A * groupMemberList - pointer to pointer to stmfGroupProperties list 2N/A * STMF_PS_SUCCESS on success 2N/A * STMF_PS_ERROR_* on failure 2N/A * psGetViewEntryList 2N/A * luGuid - identifier of logical unit for which to retrieve a view entry list 2N/A * viewEntryList - pointer to pointer to stmfViewEntryList. It will be allocated 2N/A * on successful return. 2N/A * STMF_PS_SUCCESS on success 2N/A * STMF_PS_ERROR_* on failure 2N/A * Allocate scf resources 2N/A /* Convert to ASCII uppercase hexadecimal string */ 2N/A "%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X",
2N/A /* form the LU property group name (LU-<guid>) */ 2N/A /* get the property group associated with this LU */ 2N/A /* get the view entry count property */ 2N/A * Get the actual value of the view entry count property 2N/A * propIter is the iterator handle 2N/A * alloc the list based on the view entry count 2N/A * iterate through the view entry properties to find the 2N/A /* find match for view entry property */ 2N/A * We've exceeded our alloc limit 2N/A /* set the list count */ 2N/A * We're sorting the final list here based on the veIndex 2N/A * If we don't, the caller is going to have to do it to reap 2N/A * some intelligent output. 2N/A * viewEntryPgName - view entry property group name to retrieve 2N/A * viewEntry - pointer to stmfViewEntry structure allocated by the caller 2N/A * STMF_PS_SUCCESS on success 2N/A * STMF_PS_ERROR_* on failure 2N/A * Allocate scf resources 2N/A * get the service property group view entry handle 2N/A * format is: VE-<veIndex>-GUID 2N/A /* get allHosts property */ 2N/A /* get hostGroup property */ 2N/A /* get allTargets property */ 2N/A /* set allTargets */ 2N/A /* get targetGroup property */ 2N/A /* set targetGroup */ 2N/A /* get luNbr property */ 2N/A /* set luNbrValid to true since we just got it */ 2N/A * psRemoveHostGroupMember 2N/A * Remove a host group member from a host group, 2N/A * groupName - name of group from which the member is removed 2N/A * memberName - name of group member to remove 2N/A * STMF_PS_SUCCESS on success 2N/A * STMF_PS_ERROR_* on failure 2N/A * psRemoveTargetGroupMember 2N/A * Remove a target port group member from an target port group, 2N/A * groupName - name of group from which the member is removed 2N/A * memberName - name of group member to remove 2N/A * STMF_PS_SUCCESS on success 2N/A * STMF_PS_ERROR_* on failure 2N/A * Retrieves an nvlist on a per provider basis 2N/A * providerName - property group name to use 2N/A * nvl - nvlist to retrieve 2N/A * create the property group name 2N/A * Allocate scf resources 2N/A * Retrieve the existing property group. 2N/A * Get the STMF_PROVIDER_DATA_PROP_COUNT property 2N/A * Get the STMF_PROVIDER_DATA_PROP_COUNT value 2N/A * Now get the actual value from the value handle 2N/A /* Has the caller requested the token to be set? */ 2N/A * Get the STMF_PROVIDER_DATA_PROP_SET_COUNT property 2N/A * If it doesn't exist, we assume it to be zero. 2N/A * Get the STMF_PROVIDER_DATA_PROP_SET_COUNT value 2N/A "get property value %s/%s failed - %s",
2N/A * Now get the actual value from the value handle 2N/A * and set the caller's token 2N/A "get integer value %s/%s failed - %s",
2N/A * create the name to use for the property 2N/A * Set the data block offset 2N/A * psGetProviderDataList 2N/A * Retrieves the list of providers that currently store persistent data 2N/A * providerList - pointer to a pointer to an stmfProviderList structure 2N/A * On success, this will contain the list of providers 2N/A * currently storing persistent data. 2N/A * Allocate scf resources 2N/A * pgIter is the iterator handle 2N/A * Only count LU property groups 2N/A * pgIter is the iterator handle 2N/A * the property groups. Just make sure we don't write beyond our 2N/A * allocated buffer by checking to ensure i < providerCnt. 2N/A * Only use provider data property groups 2N/A * Get the STMF_PROVIDER_DATA_PROP_TYPE property 2N/A * Get the STMF_PROVIDER_DATA_PROP_TYPE value 2N/A * Now get the actual value from the value handle 2N/A /* determine offset for copy of provider name */ 2N/A /* copy provider name to caller's list */ 2N/A * Stores a packed nvlist on a per provider basis 2N/A * providerName - property group name to use 2N/A * nvl - nvlist to store 2N/A * providerType - type of provider (logical unit or port) 2N/A /* represents arrays of entry and value pointers for scf */ 2N/A * These declarations are for known entry and value set/get 2N/A * create the property group name 2N/A * Allocate scf resources 2N/A * Get the existing property group 2N/A * create the property group. 2N/A * Begin the transaction 2N/A * Get the STMF_PROVIDER_DATA_PROP_COUNT property 2N/A * Get the STMF_PROVIDER_DATA_PROP_COUNT value 2N/A * Now get the actual value from the value handle 2N/A * Get the STMF_PROVIDER_DATA_PROP_SET_COUNT property 2N/A * If it doesn't exist, we'll create it later after successfully 2N/A * Get the STMF_PROVIDER_DATA_PROP_SET_COUNT value 2N/A * Now get the actual value from the value handle 2N/A * Compare the setCnt prop to the caller's. 2N/A * prepare the list for writing 2N/A /* Determine how many chunks we need to write */ 2N/A /* allocate entry and value resources for writing those chunks */ 2N/A * allocate entry delete resources for deleting anything existing 2N/A * that is more than the new block count. We could leave them around 2N/A * without suffering any ill effects but it will be cleaner to look at 2N/A * in smf tools if they are deleted. 2N/A * Create the entry resource for the prop 2N/A /* bump alloc count for addEntry allocation */ 2N/A * create the name to use for the property 2N/A * Create the new property 2N/A "change %s/%s failed - %s",
2N/A "transaction property new %s/%s " 2N/A * Create the value resource for the prop 2N/A /* bump alloc count for addValue allocation */ 2N/A * Set the data block offset and size 2N/A * Add the data block to the transaction entry 2N/A * Now we need to delete any chunks (properties) that are no longer 2N/A * needed. Iterate through the rest of the chunks deleting each. 2N/A * Create the entry resource for the prop 2N/A * create the name to use for the property 2N/A * Delete the existing property 2N/A * Ensure the read_authorization property is set 2N/A /* create or change the count property */ 2N/A /* create or change the set count property */ 2N/A "transaction property change %s/%s " 2N/A /* create or change the provider type property */ 2N/A "transaction property change %s/%s " 2N/A /* pass the new token back to the caller if requested */ 2N/A * Purpose: Get a single view entry based on the logical unit identifier and 2N/A * lu - logical unit identifier 2N/A * viewEntryIndex - index of view entry 2N/A * ve - caller allocated stmfViewEntry structure. On success, this will 2N/A * contain the retrieved view entry 2N/A /* Convert to ASCII uppercase hexadecimal string */ 2N/A "%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X",
2N/A * Format of view entry property group name: 2N/A * VE-<view_entry_index>-<lu_name> 2N/A * Remove a view entry 2N/A * luGuid - identifier of logical unit from which to remove view entry 2N/A * viewEntryIndex - view entry name to remove 2N/A * STMF_PS_SUCCESS on success 2N/A * STMF_PS_ERROR_* on failure 2N/A /* grab the signal hold lock */ 2N/A * hold signals until we're done 2N/A /* Convert to ASCII uppercase hexadecimal string */ 2N/A "%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X",
2N/A * Format of view entry property group name: 2N/A * VE-<view_entry_index>-<lu_name> 2N/A * update the logical unit property group to remove 2N/A * the view entry and update the view entry count 2N/A * If it fails, we won't delete the property group so that 2N/A * we maintain consistency. 2N/A * Delete the view entry. If this fails, we should try to add 2N/A * the logical unit view entry property group back otherwise 2N/A * we're inconsistent. 2N/A * Okay, we're done. Release the signals 2N/A * Don't set this as an STMF_PS_ERROR_*. We succeeded 2N/A * the requested operation. But we do need to log it. 2N/A /* release the signal hold lock */ 2N/A * Hold SIGINT, SIGTERM, SIGQUIT until further notice. 2N/A * Saves old signal mask on a per thread basis 2N/A * and saves action for the process. 2N/A * Installs action for above signals. 2N/A * locks held: sigSetLock 2N/A * non-zero otherwise 2N/A * Return existing signal mask for this thread 2N/A * Have we set the actions for the signals we want to catch? 2N/A * We still need to change the mask for the current thread 2N/A * Re-install the original signal mask and signal actions 2N/A * Also, raise any signals that were caught during the hold period and clear 2N/A * the signal from the caught set (signalsCaught). 2N/A * locks held: sigSetLock 2N/A * non-zero otherwise 2N/A * Restore previous signal mask for this thread 2N/A * Now raise signals that were raised while we were held