summaryrefslogtreecommitdiff
path: root/src/librc/librc-misc.c
Commit message (Collapse)AuthorAge
* librc: Do not output error messages from within the library.William Hubbs2012-03-26
| | | | | | | | | This fixes a compile issue. Also, it is cleaner to have the client output error messages as opposed to having the library do this. Reported-by: Ewoud Kohl van Wijngaarden <gentoo@kohlvanwijngaarden.nl> X-Gentoo-Bug: 409743 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=409743
* librc: make rc_proc_getent available for all operating systemsWilliam Hubbs2012-02-25
| | | | | | This looks up an option on the kernel command line. For now, itworks on linux and returns NULL on the bsds, but we are definitely open to patches for that side.
* Complain about loading /etc/conf.d/rcWilliam Hubbs2012-01-30
| | | | | | | | Openrc was quietly loading this file if it existed and this was causing some issues, so now openrc loads the file and complains about it. Hopefully the warning message will convince everyone to remove this file and migrate the settings to @SYSCONFDIR@/rc.conf where they belong.
* WhitespaceChristian Ruppert2012-01-26
|
* Override rc.conf options onlyChristian Ruppert2012-01-24
|
* small style fixWilliam Hubbs2012-01-20
|
* style fixesWilliam Hubbs2012-01-16
|
* Allow overriding of rc.conf options via kernel cmdlineChristian Ruppert2012-01-15
| | | | | | | | This adds a new function that allows us to override some specific rc.conf options via the kernel cmdline aka /proc/cmdline. This makes esp. sense in cases where a rc_parallel enabled system has boot issues. Simply disable rc_parallel by appending rc_parallel=no to your kernel cmdline.
* Rename proc_getent to rc_proc_getent and make it globalChristian Ruppert2012-01-15
|
* Add a new function, bool rc_getfile(const char *, char **, size_t *)Mike Frysinger2011-07-13
| | | | | | | | | | | | | | <snip> Read the entire @file into the buffer and set @len to the size of the buffer when finished. For C strings, this will be strlen(buffer) + 1. Don't forget to free the buffer afterwards! </snip> We also fix bug 374899 by adding this new function. X-Gentoo-Bug: 374899 X-Gentoo-Bug-URL: http://bugs.gentoo.org/374899
* Do not skip similar config optionsChristian Ruppert2011-07-09
| | | | | | | | | | | | | | | OpenRC goes through the config and checks each option for duplicates. Lets say we're on "rc_logger" currently and its the last option in the config file and we previously defined rc_logger_path. It now goes through all previous config options and compares those against the current one "rc_logger" *but* it compares only the first N bytes, in this case strlen("rc_logger"). So it strips the _path from "rc_logger_path" which ends up into "rc_logger" and it compares that against the current one (also "rc_logger"), it would then simply override the previous definition. This patch fixes this behaviour to always compare the full option / variable names.
* drop useless "All rights reserved" noticeMike Frysinger2011-06-29
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* librc: delete trailing newlinesMike Frysinger2011-01-17
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Bug #351570: Hidden function fixes: rc_conf_value.Robin H. Johnson2011-01-17
| | | | | | | | | | | Refactor rc_conf_value into librc for use in library context. Also requires moving: - rc_conf internal static - Defines: PROFILE_ENV, SYS_WHITELIST, USR_WHITELIST, RC_PATH_PREFIX moved to rc.h with new RC_ prefix added. - Defines: RC_CONF, RC_CONF_OLD moved to rc.h. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
* Style fix: "while (" not "while(".Robin H. Johnson2011-01-17
|
* Add (c) to CopyrightRoy Marples2009-05-01
|
* We should match the full variable name.Roy Marples2009-04-24
|
* Improve style for KNFRoy Marples2009-04-23
|
* Clean up some compiler warnings.Roy Marples2009-01-29
|
* sysinit is now a real runlevel that handles things like udev, dmesg andRoy Marples2008-10-10
| | | | | | | | | | | mounting various bits in /dev and /sys. init.sh JUST mounts /lib/rc/init.d (and /proc for Linux systems) To make development of this easier we now return an empty RC_STRINGLIST instead of a NULL for empty things. If you don't have a udev init script installed, don't reboot your box OR roll back to an older OpenRC version.
* Add missing profile bits to env, #72.Roy Marples2008-09-18
|
* realloc -> xreallocRoy Marples2008-05-19
|
* Fix a potential segfault, thanks to Fernando J. Pereda.Roy Marples2008-05-19
|
* Style.Roy Marples2008-05-12
|
* Add license blurb to a few files and append my email to my name.Roy Marples2008-03-26
|
* Fix a segfault if rc.conf does not exist, Gentoo #214887Roy Marples2008-03-26
|
* Make rc_getline private and save it's buffer so it's sort of like getline ↵Roy Marples2008-03-17
| | | | from glibc.
* Punt the rc_strcatpaths function and use snprintf instead to save on ↵Roy Marples2008-03-17
| | | | expensive malloc calls.
* Remove null terminated char ** lists in favour of RC_STRINGLIST, using TAILQ ↵Roy Marples2008-03-16
| | | | from queue(3). Refactor code style around the BSD KNF.
* Welcome to 2008.Roy Marples2008-02-22
|
* Quiet some lint warnings.Roy Marples2008-01-22
|
* Checking first char for null is more efficient than strlen.Roy Marples2008-01-21
|
* We should never change the list passed to rc_config_value.Roy Marples2008-01-18
|
* strip trailing newlinesMike Frysinger2008-01-14
|
* Re-indent to a standard tw of 8.Roy Marples2008-01-11
|
* Loads of NetBSD tweaks here.Roy Marples2008-01-10
|
* Avoid valgrind errors with getline.Roy Marples2008-01-07
|
* Really fix off by one error.Roy Marples2008-01-07
|
* Fix an off by one error.Roy Marples2008-01-07
|
* rc_getline keeps expanding it's malloced buffer until it has read a whole ↵Roy Marples2008-01-07
| | | | line or EOF. All functions which read into static buffers have been changed to use fhis function to avoid any potential overflows and to ensure we really do read a long long config line.
* Use a dynamically expanding buffer for reading config files.Roy Marples2008-01-06
|
* Add some .mk stubs to impersonate bsk .mk files to make writing our ↵Roy Marples2008-01-05
Makefiles easier. libeinfo, librc and rc now have their own seperate directories. More work is needed to tidy this up though.