Compare commits

..

2 Commits

Author SHA1 Message Date
William Hubbs
ba457f1fed Release openrc-0.9.9.2 2012-02-25 20:50:36 -06:00
William Hubbs
722871c0ae librc: make rc_proc_getent available for all operating systems
This looks up an option on the kernel command line. For now, it works on
linux and returns NULL on the bsds, but we are definitely open to
patches for that side.
2012-02-25 15:41:31 -06:00
3 changed files with 5 additions and 5 deletions

View File

@@ -1,3 +1,3 @@
NAME= openrc
VERSION= 0.9.9.1
VERSION= 0.9.9.2
PKG= ${NAME}-${VERSION}

View File

@@ -128,10 +128,10 @@ rc_getline(char **line, size_t *len, FILE *fp)
}
librc_hidden_def(rc_getline)
#ifdef __linux__
char *
rc_proc_getent(const char *ent)
{
#ifdef __linux__
FILE *fp;
char *proc, *p, *value = NULL;
size_t i, len;
@@ -171,9 +171,11 @@ rc_proc_getent(const char *ent)
free(proc);
return value;
#else
return NULL;
#endif
}
librc_hidden_def(rc_proc_getent)
#endif
RC_STRINGLIST *
rc_config_list(const char *file)

View File

@@ -360,12 +360,10 @@ bool rc_newer_than(const char *, const char *, time_t *, char *);
* @return true if source is older than target, otherwise false */
bool rc_older_than(const char *, const char *, time_t *, char *);
#ifdef __linux__
/*! Read variables/values from /proc/cmdline
* @param value
* @return pointer to the value, otherwise NULL */
char *rc_proc_getent(const char *);
#endif
/*! Update the cached dependency tree if it's older than any init script,
* its configuration file or an external configuration file the init script