@ -903,8 +903,8 @@ wet_load_shell(struct weston_compositor *compositor,
return 0 ;
return 0 ;
}
}
WL_EXPORT char *
static char *
wet_get_binary_path ( const char * name )
wet_get_binary_path ( const char * name , const char * dir )
{
{
char path [ PATH_MAX ] ;
char path [ PATH_MAX ] ;
size_t len ;
size_t len ;
@ -913,13 +913,25 @@ wet_get_binary_path(const char *name)
if ( len > 0 )
if ( len > 0 )
return strdup ( path ) ;
return strdup ( path ) ;
len = snprintf ( path , sizeof path , " %s/%s " , LIBEXECDIR , name ) ;
len = snprintf ( path , sizeof path , " %s/%s " , dir , name ) ;
if ( len > = sizeof path )
if ( len > = sizeof path )
return NULL ;
return NULL ;
return strdup ( path ) ;
return strdup ( path ) ;
}
}
WL_EXPORT char *
wet_get_libexec_path ( const char * name )
{
return wet_get_binary_path ( name , LIBEXECDIR ) ;
}
WL_EXPORT char *
wet_get_bindir_path ( const char * name )
{
return wet_get_binary_path ( name , BINDIR ) ;
}
static int
static int
load_modules ( struct weston_compositor * ec , const char * modules ,
load_modules ( struct weston_compositor * ec , const char * modules ,
int * argc , char * argv [ ] , int32_t * xwayland )
int * argc , char * argv [ ] , int32_t * xwayland )