projects
/
cascardo
/
ovs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
lib: Add API to set program name and version
[cascardo/ovs.git]
/
lib
/
util.c
diff --git
a/lib/util.c
b/lib/util.c
index
f4d0f8d
..
453ade6
100644
(file)
--- a/
lib/util.c
+++ b/
lib/util.c
@@
-448,12
+448,12
@@
ovs_strerror(int error)
*
* The 'date' and 'time' arguments should likely be called with
* "__DATE__" and "__TIME__" to use the time the binary was built.
*
* The 'date' and 'time' arguments should likely be called with
* "__DATE__" and "__TIME__" to use the time the binary was built.
- * Alternatively, the "set_program_name" macro may be called to do this
+ * Alternatively, the "
ovs_
set_program_name" macro may be called to do this
* automatically.
*/
void
* automatically.
*/
void
-set_program_name__(const char *argv0, const char *version, const char *date,
- const char *time)
+
ovs_
set_program_name__(const char *argv0, const char *version, const char *date,
+
const char *time)
{
char *basename;
#ifdef _WIN32
{
char *basename;
#ifdef _WIN32
@@
-533,11
+533,20
@@
set_subprogram_name(const char *format, ...)
* caller must not modify or free the returned string.
*/
const char *
* caller must not modify or free the returned string.
*/
const char *
-get_program_version(void)
+
ovs_
get_program_version(void)
{
return program_version;
}
{
return program_version;
}
+/* Returns a pointer to a string describing the program name. The
+ * caller must not modify or free the returned string.
+ */
+const char *
+ovs_get_program_name(void)
+{
+ return program_name;
+}
+
/* Print the version information for the program. */
void
ovs_print_version(uint8_t min_ofp, uint8_t max_ofp)
/* Print the version information for the program. */
void
ovs_print_version(uint8_t min_ofp, uint8_t max_ofp)