test/nb_vol_conn.c
/*---------------------------------------------------------------------------
 * Function:    H5VL_nonblock_info_to_str
 *
 * Purpose:     Serialize an info object for this connector into a string
 *
 * Return:      Success:    0
 *              Failure:    -1
 *
 *---------------------------------------------------------------------------
 */
H5VL_nonblock_info_to_str
Purpose:     Serialize an info object for this connector into a string


H5VL_nonblock_info_to_str Purpose : Serialize an info object for this connector into a string
static herr_t
H5VL_nonblock_info_to_str(const void *_info, char **str)
{
    const H5VL_nonblock_info_t *info              = (const H5VL_nonblock_info_t *)_info;
    H5VL_class_value_t          under_value       = (H5VL_class_value_t)-1;
    char *                      under_vol_string  = NULL;
    size_t                      under_vol_str_len = 0;
#ifdef ENABLE_NONBLOCK_LOGGING
    printf("------- NON-BLOCKING VOL INFO To String\n");
#endif
    H5VLget_value(info->under_vol_id, &under_value);
    H5VLconnector_info_to_str(info->under_vol_info, info->under_vol_id, &under_vol_string);
    if (under_vol_string)
        under_vol_str_len = strlen(under_vol_string);
    *str = (char *)H5allocate_memory(32 + under_vol_str_len, (hbool_t)0);
    assert(*str);
    sprintf(*str, "under_vol=%u;under_info={%s}", (unsigned)under_value,
            (under_vol_string ? under_vol_string : ""));
    return 0;
}
static herr_t H5VL_nonblock_info_to_str ( const void * _info , char * * str ) { const H5VL_nonblock_info_t * info = ( const H5VL_nonblock_info_t * ) _info ; H5VL_class_value_t under_value = ( H5VL_class_value_t ) - 1 ; char * under_vol_string = NULL ; size_t under_vol_str_len = 0 ; #ifdef ENABLE_NONBLOCK_LOGGING printf ( " \n " ) ; #endif H5VLget_value ( info -> under_vol_id , & under_value ) ; H5VLconnector_info_to_str ( info -> under_vol_info , info -> under_vol_id , & under_vol_string ) ; if ( under_vol_string ) under_vol_str_len = strlen ( under_vol_string ) ; * str = ( char * ) H5allocate_memory ( 32 + under_vol_str_len , ( hbool_t ) 0 ) ; assert ( * str ) ; sprintf ( * str , " " , ( unsigned ) under_value , ( under_vol_string ? under_vol_string : " " ) ) ; return 0 ; }
Function:    H5VL_nonblock_info_to_str
 Purpose:     Serialize an info object for this connector into a string
Function : H5VL_nonblock_info_to_str Purpose : Serialize an info object for this connector into a string
/* Get value and string for underlying VOL connector */ /* Determine length of underlying VOL info string */ /* Allocate space for our info */ /* Encode our info
     * Normally we'd use snprintf() here for a little extra safety, but that
     * call had problems on Windows until recently. So, to be as platform-independent
     * as we can, we're using sprintf() instead.
     */