kernels/linux-2.4.0/arch/ia64/sn/io/labelcl.c
/*
 * labelcl_info_get_LBL - Retrieve and return the information for the 
 *	given label entry.
 */
Retrieve and return the information for the
given label entry.
Retrieve and return the information for the given label entry .
int
labelcl_info_get_LBL(devfs_handle_t de,
		      char *info_name,
		      arb_info_desc_t *info_desc,
		      arbitrary_info_t *info)
{
	labelcl_info_t	*labelcl_info = NULL;
	int num_labels;
	label_info_t *label_list;
	int i;
	if (de == NULL)
		return(-1);
	labelcl_info = devfs_get_info(de);
	if (labelcl_info == NULL)
		return(-1);
	if (labelcl_info->hwcl_magic != LABELCL_MAGIC)
		return(-1);
	num_labels = labelcl_info->num_labels;
	if (num_labels == 0) {
		return(-1);
	}
	label_list = labelcl_info->label_list;
	for (i=0; i<num_labels; i++)
		if (!strcmp(info_name, label_list[i].name)) {
			if (info != NULL)
				*info = label_list[i].info;
			if (info_desc != NULL)
				*info_desc = label_list[i].desc;
			return(0);
		}
	return(-1);
}
int labelcl_info_get_LBL ( devfs_handle_t de , char * info_name , arb_info_desc_t * info_desc , arbitrary_info_t * info ) { labelcl_info_t * labelcl_info = NULL ; int num_labels ; label_info_t * label_list ; int i ; if ( de == NULL ) return ( -1 ) ; labelcl_info = devfs_get_info ( de ) ; if ( labelcl_info == NULL ) return ( -1 ) ; if ( labelcl_info -> hwcl_magic != LABELCL_MAGIC ) return ( -1 ) ; num_labels = labelcl_info -> num_labels ; if ( num_labels == 0 ) { return ( -1 ) ; } label_list = labelcl_info -> label_list ; for ( i = 0 ; i < num_labels ; i ++ ) if ( ! strcmp ( info_name , label_list [ i ] . name ) ) { if ( info != NULL ) * info = label_list [ i ] . info ; if ( info_desc != NULL ) * info_desc = label_list [ i ] . desc ; return ( 0 ) ; } return ( -1 ) ; }
labelcl_info_get_LBL - Retrieve and return the information for the
      given label entry.
labelcl_info_get_LBL - Retrieve and return the information for the given label entry .
/* 
	 * Find information under info_name.
	 */