@ -417,7 +417,7 @@ static int superblocks_probe(blkid_probe pr, struct blkid_chain *chn)
/* all checks passed */
if ( chn - > flags & BLKID_SUBLKS_TYPE )
rc = blkid_probe_set_value ( pr , " TYPE " ,
( unsigned char * ) id - > name ,
( const unsigned char * ) id - > name ,
strlen ( id - > name ) + 1 ) ;
if ( ! rc )
@ -425,7 +425,7 @@ static int superblocks_probe(blkid_probe pr, struct blkid_chain *chn)
if ( ! rc & & mag )
rc = blkid_probe_set_magic ( pr , off , mag - > len ,
( unsigned char * ) mag - > magic ) ;
( const unsigned char * ) mag - > magic ) ;
if ( rc ) {
blkid_probe_chain_reset_values ( pr , chn ) ;
DBG ( LOWPROBE , ul_debug ( " failed to set result -- ignore " ) ) ;
@ -531,7 +531,8 @@ int blkid_probe_set_version(blkid_probe pr, const char *version)
if ( chn - > flags & BLKID_SUBLKS_VERSION )
return blkid_probe_set_value ( pr , " VERSION " ,
( unsigned char * ) version , strlen ( version ) + 1 ) ;
( const unsigned char * ) version ,
strlen ( version ) + 1 ) ;
return 0 ;
}
@ -574,7 +575,7 @@ static int blkid_probe_set_usage(blkid_probe pr, int usage)
}
int blkid_probe_set_id_label ( blkid_probe pr , const char * name ,
unsigned char * data , size_t len )
const unsigned char * data , size_t len )
{
struct blkid_chain * chn = blkid_probe_get_chain ( pr ) ;
struct blkid_prval * v ;
@ -603,7 +604,7 @@ int blkid_probe_set_id_label(blkid_probe pr, const char *name,
}
int blkid_probe_set_utf8_id_label ( blkid_probe pr , const char * name ,
unsigned char * data , size_t len , int enc )
const unsigned char * data , size_t len , int enc )
{
struct blkid_chain * chn = blkid_probe_get_chain ( pr ) ;
struct blkid_prval * v ;
@ -633,7 +634,7 @@ int blkid_probe_set_utf8_id_label(blkid_probe pr, const char *name,
return rc ;
}
int blkid_probe_set_label ( blkid_probe pr , unsigned char * label , size_t len )
int blkid_probe_set_label ( blkid_probe pr , const unsigned char * label , size_t len )
{
struct blkid_chain * chn = blkid_probe_get_chain ( pr ) ;
struct blkid_prval * v ;
@ -661,7 +662,7 @@ int blkid_probe_set_label(blkid_probe pr, unsigned char *label, size_t len)
return rc ;
}
int blkid_probe_set_utf8label ( blkid_probe pr , unsigned char * label ,
int blkid_probe_set_utf8label ( blkid_probe pr , const unsigned char * label ,
size_t len , int enc )
{
struct blkid_chain * chn = blkid_probe_get_chain ( pr ) ;
@ -693,7 +694,7 @@ int blkid_probe_set_utf8label(blkid_probe pr, unsigned char *label,
return rc ;
}
int blkid_probe_sprintf_uuid ( blkid_probe pr , unsigned char * uuid ,
int blkid_probe_sprintf_uuid ( blkid_probe pr , const unsigned char * uuid ,
size_t len , const char * fmt , . . . )
{
struct blkid_chain * chn = blkid_probe_get_chain ( pr ) ;
@ -718,7 +719,7 @@ int blkid_probe_sprintf_uuid(blkid_probe pr, unsigned char *uuid,
}
/* function to set UUIDs that are in superblocks stored as strings */
int blkid_probe_strncpy_uuid ( blkid_probe pr , unsigned char * str , size_t len )
int blkid_probe_strncpy_uuid ( blkid_probe pr , const unsigned char * str , size_t len )
{
struct blkid_chain * chn = blkid_probe_get_chain ( pr ) ;
struct blkid_prval * v ;
@ -728,7 +729,7 @@ int blkid_probe_strncpy_uuid(blkid_probe pr, unsigned char *str, size_t len)
return - EINVAL ;
if ( ! len )
len = strlen ( ( char * ) str ) ;
len = strlen ( ( const char * ) str ) ;
if ( ( chn - > flags & BLKID_SUBLKS_UUIDRAW ) & &
( rc = blkid_probe_set_value ( pr , " UUID_RAW " , str , len ) ) < 0 )
@ -753,7 +754,7 @@ int blkid_probe_strncpy_uuid(blkid_probe pr, unsigned char *str, size_t len)
}
/* default _set_uuid function to set DCE UUIDs */
int blkid_probe_set_uuid_as ( blkid_probe pr , unsigned char * uuid , const char * name )
int blkid_probe_set_uuid_as ( blkid_probe pr , const unsigned char * uuid , const char * name )
{
struct blkid_chain * chn = blkid_probe_get_chain ( pr ) ;
struct blkid_prval * v ;
@ -791,7 +792,7 @@ int blkid_probe_set_uuid_as(blkid_probe pr, unsigned char *uuid, const char *nam
return rc ;
}
int blkid_probe_set_uuid ( blkid_probe pr , unsigned char * uuid )
int blkid_probe_set_uuid ( blkid_probe pr , const unsigned char * uuid )
{
return blkid_probe_set_uuid_as ( pr , uuid , NULL ) ;
}