- 03 5月, 2013 1 次提交
-
-
由 Eric Blake 提交于
POSIX says pthread_t is opaque. We can't guarantee if it is scaler or a pointer, nor what size it is; and BSD differs from Linux. We've also had reports of gcc complaining on attempts to cast it, if we use a cast to the wrong type (for example, pointers have to be cast to void* or intptr_t before being narrowed; while casting a function return of scalar pthread_t to void* triggers a different warning). Give up on casts, and use unions to get at decent bits instead. And rather than futz around with figuring which 32 bits of a potentially 64-bit pointer are most likely to be unique, convert the rest of the code base to use 64-bit values when using a debug id. Based on a report by Guido Günther against kFreeBSD, but with a fix that doesn't regress commit 4d970fd2 for FreeBSD. * src/util/virthreadpthread.c (virThreadSelfID, virThreadID): Use union to get at a decent bit representation of thread_t bits. * src/util/virthread.h (virThreadSelfID, virThreadID): Alter signature. * src/util/virthreadwin32.c (virThreadSelfID, virThreadID): Likewise. * src/qemu/qemu_domain.h (qemuDomainJobObj): Alter type of owner. * src/qemu/qemu_domain.c (qemuDomainObjTransferJob) (qemuDomainObjSetJobPhase, qemuDomainObjReleaseAsyncJob) (qemuDomainObjBeginNestedJob, qemuDomainObjBeginJobInternal): Fix clients. * src/util/virlog.c (virLogFormatString): Likewise. * src/util/vireventpoll.c (virEventPollInterruptLocked): Likewise. Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 02 5月, 2013 1 次提交
-
-
由 Michal Privoznik 提交于
The source code base needs to be adapted as well. Some files include virutil.h just for the string related functions (here, the include is substituted to match the new file), some include virutil.h without any need (here, the include is removed), and some require both.
-
- 23 4月, 2013 1 次提交
-
-
由 Jiri Denemark 提交于
-
- 27 3月, 2013 1 次提交
-
-
由 Jiri Denemark 提交于
When we write a log message into a log, we separate thread ID from timestamp using ": ". However, when storing the message into the ring buffer, we omitted the separator, e.g.: 2013-02-27 11:49:11.852+00003745: ...
-
- 14 3月, 2013 1 次提交
-
-
由 Guannan Ren 提交于
In debug mode, the bug failed to start vm error: Failed to start domain rhel5u9 error: internal error Out of space while reading console log output: ...
-
- 08 3月, 2013 1 次提交
-
-
由 Daniel P. Berrange 提交于
When reading log output from QEMU/LXC we need to skip over any libvirt log messages. Currently the QEMU driver checks for a fixed string, but this is better done with a regex. Add a method virLogProbablyLogMessage to do a regex check Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 30 1月, 2013 1 次提交
-
-
由 Doug Goldstein 提交于
Setting the log output prefix to 0 is not supported and in fact results in the following message: warning : virLogParseOutputs:1021 : Ignoring invalid log output setting.
-
- 21 12月, 2012 6 次提交
-
-
由 Daniel P. Berrange 提交于
-
由 Daniel P. Berrange 提交于
-
由 Daniel P. Berrange 提交于
-
由 Daniel P. Berrange 提交于
-
由 Daniel P. Berrange 提交于
-
由 Daniel P. Berrange 提交于
Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 15 11月, 2012 3 次提交
-
-
由 Miloslav Trmač 提交于
This simplifies the top-level code, at the cost of using a little more stack space. The primary benefit is being able to send more fields without knowing in advance how many of them, and of which types, these fields will be, and without having to individually add buffer variables. The code imposes an upper limit on the total number of iovs/buffers used, and fields that wouldn't fit are silently dropped. This is not significant in this patch, but will affect the following one. Signed-off-by: NMiloslav Trmač <mitr@redhat.com>
-
由 Miloslav Trmač 提交于
... and update all users. No change in functionality, the parameter will be used in the next patch. Signed-off-by: NMiloslav Trmač <mitr@redhat.com>
-
由 Miloslav Trmač 提交于
... and update all users. No change in functionality, the parameter will be used later. The metadata representation is as minimal as possible, but requires the caller to allocate an array on stack explicitly. The alternative of using varargs in the virLogMessage() callers: * Would not allow the caller to optionally omit some metadata elements, except by having two calls to virLogMessage. * Would not be as type-safe (e.g. using int vs. size_t), and the compiler wouldn't be able to do type checking * Depending on parameter order: a) virLogMessage(..., message format, message params..., metadata..., NULL) can not be portably implemented (parse_printf_format() is a glibc function) b) virLogMessage(..., metadata..., NULL, message format, message params...) would prevent usage of ATTRIBUTE_FMT_PRINTF and the associated compiler checking. Signed-off-by: NMiloslav Trmač <mitr@redhat.com>
-
- 02 11月, 2012 4 次提交
-
-
由 Daniel P. Berrange 提交于
The libvirt coding standard is to use 'function(...args...)' instead of 'function (...args...)'. A non-trivial number of places did not follow this rule and are fixed in this patch. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel Veillard 提交于
I didn't noticed that that small old patch was still applied locally
-
由 Michal Privoznik 提交于
With our fix of mkostemp (pushed as 2b435c15) we define a macro to compile with uclibc. However, this definition is conditional and thus needs to be properly indented. Moreover, with this definition sc_prohibit_mkstemp syntax-check rule keeps yelling: src/util/logging.c:63:# define mkostemp(x,y) mkstemp(x) maint.mk: use mkostemp with O_CLOEXEC instead of mkstemp Therefore we should ignore this file for this rule.
-
由 Daniel Veillard 提交于
* configure.ac docs/news.html.in libvirt.spec.in: update for the new release * po/*.po*: update from transifex, a lot of added support e.g. Indian languages, and regenerate
-
- 26 10月, 2012 1 次提交
-
-
由 Cole Robinson 提交于
This commit changes the behavior of LIBVIRT_DEBUG=1 libvirtd: $ git show 7022b091 commit 7022b091 Author: Daniel P. Berrange <berrange@redhat.com> Date: Thu Sep 27 13:13:09 2012 +0100 Automatically enable systemd journal logging Probe to see if the systemd journal is accessible, and if so enable logging to the journal by default, rather than stderr (current default under systemd). Previously 'LIBVIRT_DEBUG=1 /usr/sbin/libvirtd' would show all debug output to stderr, now it send debug output to the journal. Only use the journal by default if running in daemon mode, or if stdin is _not_ a tty. This should make libvirtd launched from systemd use the journal, but preserve the old behavior in most situations.
-
- 12 10月, 2012 1 次提交
-
-
由 Ján Tomko 提交于
-
- 02 10月, 2012 1 次提交
-
-
由 Eric Blake 提交于
Commit f6430390 broke builds on RHEL 5, where glibc (2.5) is too old to support mkostemp (2.7) or htole64 (2.9). While gnulib has mkostemp, it still lacks htole64; and it's not worth dragging in replacements on systems where journald is unlikely to exist in the first place, so we just use an extra configure-time check as our witness of whether to attempt compiling the code. * src/util/logging.c (virLogParseOutputs): Don't attempt to compile journald on older glibc. * configure.ac (AC_CHECK_DECLS): Check for htole64.
-
- 28 9月, 2012 7 次提交
-
-
由 Daniel P. Berrange 提交于
Add support for logging to the systemd journal, using its simple client library. The benefit over syslog is that it accepts structured log data, so the journald can store individual items like code file/line/func separately from the string message. Tools which require structured log data can then query the journal to extract exactly what they desire without resorting to string parsing While systemd provides a simple client library for logging, it is more convenient for libvirt to directly write its own client code. This lets us build up the iovec's on the stack, avoiding the need to alloc memory when writing log messages. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
The 'const char *category' parameter only has a few possible values now that the filename has been separated. Turn this parameter into an enum instead. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
Currently the logging APIs have a 'const char *category' parameter which indicates where the log message comes from. This is typically a combination of the __FILE__ string and other prefix. Split the __FILE__ off into a dedicated parameter so it can passed to the log outputs Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
General whitespace cleanup in the logging files - Move '{' to a new line after funtion declaration - Put each parameter on a new line to avoid long lines - Put return type on new line - Leave 2 blank lines between functions Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
The log destinations are an enum, but most of the code was just using a plain 'int' for function params / variables. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
The __LINE__ macro value is specified to fit in the size_t type, so use that instead of 'long long' in the logging code Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
The log priority levels are an enum, but most of the code was just using a plain 'int' for function params / variables. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 27 9月, 2012 2 次提交
-
-
由 Miloslav Trmač 提交于
In addition to the preformatted text line, pass the raw message as well, to allow the output functions to use a different output format. Signed-off-by: NMiloslav Trmač <mitr@redhat.com> Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Miloslav Trmač 提交于
Allow for the code converting from libvirt log levels to syslog log levels to be reused. Signed-off-by: NMiloslav Trmač <mitr@redhat.com> Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 22 9月, 2012 1 次提交
-
-
由 Miloslav Trmač 提交于
Nothing uses the return value, and creating it requries otherwise unnecessary strlen () calls. This cleanup is conceptually independent from the rest of the series (although the later patches won't apply without it). This just seems a good opportunity to clean this up, instead of entrenching the unnecessary return value in the virLogOutputFunc instance that will be added in this series. Signed-off-by: NMiloslav Trmač <mitr@redhat.com>
-
- 21 9月, 2012 1 次提交
-
-
由 Eric Blake 提交于
https://www.gnu.org/licenses/gpl-howto.html recommends that the 'If not, see <url>.' phrase be a separate sentence. * tests/securityselinuxhelper.c: Remove doubled line. * tests/securityselinuxtest.c: Likewise. * globally: s/; If/. If/
-
- 07 9月, 2012 1 次提交
-
-
由 Eric Blake 提交于
FreeBSD and OpenBSD have a <net/if.h> that is not self-contained; and mingw lacks the header altogether. But gnulib has just taken care of that for us, so we might as well simplify our code. In the process, I got a syntax-check failure if we don't also take the gnulib execinfo module. * .gnulib: Update to latest, for execinfo and net_if. * bootstrap.conf (gnulib_modules): Add execinfo and net_if modules. * configure.ac: Let gnulib check for headers. Simplify check for 'struct ifreq', while also including enough prereq headers. * src/internal.h (IF_NAMESIZE): Drop, now that gnulib guarantees it. * src/nwfilter/nwfilter_learnipaddr.h: Use correct header for IF_NAMESIZE. * src/util/virnetdev.c (includes): Assume <net/if.h> exists. * src/util/virnetdevbridge.c (includes): Likewise. * src/util/virnetdevtap.c (includes): Likewise. * src/util/logging.c (includes): Assume <execinfo.h> exists. (virLogStackTraceToFd): Handle gnulib's fallback implementation.
-
- 02 8月, 2012 1 次提交
-
-
由 Daniel P. Berrange 提交于
Remove the use of a manually run virLogStartup and virNodeSuspendInitialize methods. Instead make sure they are automatically run using VIR_ONCE_GLOBAL_INIT Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 23 7月, 2012 1 次提交
-
-
由 Osier Yang 提交于
Per the FSF address could be changed from time to time, and GNU recommends the following now: (http://www.gnu.org/licenses/gpl-howto.html) You should have received a copy of the GNU General Public License along with Foobar. If not, see <http://www.gnu.org/licenses/>. This patch removes the explicit FSF address, and uses above instead (of course, with inserting 'Lesser' before 'General'). Except a bunch of files for security driver, all others are changed automatically, the copyright for securify files are not complete, that's why to do it manually: src/security/security_selinux.h src/security/security_driver.h src/security/security_selinux.c src/security/security_apparmor.h src/security/security_apparmor.c src/security/security_driver.c
-
- 28 6月, 2012 1 次提交
-
-
由 Peter Krempa 提交于
The ignore_value macro is used across libvirt. This patch includes it in the internal header and cleans all other includes.
-
- 08 6月, 2012 1 次提交
-
-
由 Jiri Denemark 提交于
When libvirtd forks off a new child, the child then calls virLogReset(), which ends up closing file descriptors used as log outputs. However, we recently started logging closed file descriptors, which means we need to lock logging mutex which was already locked by virLogReset(). We don't really want to log anything when we are in the process of closing log outputs.
-
- 17 5月, 2012 1 次提交
-
-
由 Daniel P. Berrange 提交于
Allow the logging APIs to be called with a va_list for format args, instead of requiring var-args usage. * src/util/logging.h, src/util/logging.c: Add virLogVMessage
-