Projects
openEuler:Roll:Everything:RVA20
dmraid
_service:obs_scm:0008-libversion-display.patch
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:obs_scm:0008-libversion-display.patch of Package dmraid
diff --git a/lib/misc/lib_context.c b/lib/misc/lib_context.c index f1995e1..00023e7 100644 --- a/lib/misc/lib_context.c +++ b/lib/misc/lib_context.c @@ -138,25 +138,30 @@ init_paths(struct lib_context *lc, void *arg) static void init_version(struct lib_context *lc, void *arg) { - lc->version.text = DMRAID_LIB_VERSION; + static char version[80]; + + lc->version.text = version; lc->version.date = DMRAID_LIB_DATE; lc->version.v.major = DMRAID_LIB_MAJOR_VERSION; lc->version.v.minor = DMRAID_LIB_MINOR_VERSION; lc->version.v.sub_minor = DMRAID_LIB_SUBMINOR_VERSION; lc->version.v.suffix = DMRAID_LIB_VERSION_SUFFIX; + snprintf(version, sizeof(version), "%d.%d.%d.%s", + lc->version.v.major, lc->version.v.minor, + lc->version.v.sub_minor, lc->version.v.suffix); } /* Put init functions into an array because of the potentially growing list. */ struct init_fn { void (*func) (struct lib_context * lc, void *arg); } init_fn[] = { - { - init_options}, { - init_cmd}, { - init_lists}, { - init_mode}, { - init_paths}, { -init_version},}; + { init_options}, + { init_cmd}, + { init_lists}, + { init_mode}, + { init_paths}, + { init_version}, +}; struct lib_context * alloc_lib_context(char **argv)
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2