Changeset View
Changeset View
Standalone View
Standalone View
head/lib/libbe/be_info.c
Show All 36 Lines | |||||
/* | /* | ||||
* Returns the name of the active boot environment | * Returns the name of the active boot environment | ||||
*/ | */ | ||||
const char * | const char * | ||||
be_active_name(libbe_handle_t *lbh) | be_active_name(libbe_handle_t *lbh) | ||||
{ | { | ||||
if (*lbh->rootfs != '\0') | |||||
return (strrchr(lbh->rootfs, '/') + sizeof(char)); | return (strrchr(lbh->rootfs, '/') + sizeof(char)); | ||||
else | |||||
return (lbh->rootfs); | |||||
} | } | ||||
/* | /* | ||||
* Returns full path of the active boot environment | * Returns full path of the active boot environment | ||||
*/ | */ | ||||
const char * | const char * | ||||
be_active_path(libbe_handle_t *lbh) | be_active_path(libbe_handle_t *lbh) | ||||
{ | { | ||||
return (lbh->rootfs); | return (lbh->rootfs); | ||||
} | } | ||||
/* | /* | ||||
* Returns the name of the next active boot environment | * Returns the name of the next active boot environment | ||||
*/ | */ | ||||
const char * | const char * | ||||
be_nextboot_name(libbe_handle_t *lbh) | be_nextboot_name(libbe_handle_t *lbh) | ||||
{ | { | ||||
if (*lbh->bootfs != '\0') | |||||
return (strrchr(lbh->bootfs, '/') + sizeof(char)); | return (strrchr(lbh->bootfs, '/') + sizeof(char)); | ||||
else | |||||
return (lbh->bootfs); | |||||
} | } | ||||
/* | /* | ||||
* Returns full path of the active boot environment | * Returns full path of the active boot environment | ||||
*/ | */ | ||||
const char * | const char * | ||||
be_nextboot_path(libbe_handle_t *lbh) | be_nextboot_path(libbe_handle_t *lbh) | ||||
▲ Show 20 Lines • Show All 225 Lines • Show Last 20 Lines |