| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Two sections didn't have a working link in the TOC.
|
|
|
|
|
|
|
|
|
|
|
| |
An email came to libvir-list wondering why the git send-email command
was missing in spite of having git installed; this is due to the
send-email command being in a sub-package of the main git package.
While touching the hacking file, I thought it would be useful to 1)
indicate the location of the source (docs/hacking.html.in) in the
message at the top of HACKING, and also to make the note about running
"make check" and "make syntax-check" a bit more stern.
|
|
|
|
|
|
| |
We should really advise (new) developers to send rebased patches
that apply cleanly and use git-send-email rather than all other
obscure ways.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In preparation for a future patch adding new virFile APIs.
* src/util/files.h, src/util/files.c: Move...
* src/util/virfile.h, src/util/virfile.c: ...here, and rename
functions to virFile prefix. Macro names are intentionally
left alone.
* *.c: All '#include "files.h"' uses changed.
* src/Makefile.am (UTIL_SOURCES): Reflect rename.
* cfg.mk (exclude_file_name_regexp--sc_prohibit_close): Likewise.
* src/libvirt_private.syms: Likewise.
* docs/hacking.html.in: Likewise.
* HACKING: Regenerate.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We already have virAsprintf, so picking a similar name helps for
seeing a similar purpose. Furthermore, the prefix V before printf
generally implies 'va_list', even though this variant was '...', and
the old name got in the way of adding a new va_list version.
global rename performed with:
$ git grep -l virBufferVSprintf \
| xargs -L1 sed -i 's/virBufferVSprintf/virBufferAsprintf/g'
then revert the changes in ChangeLog-old.
|
|
|
|
|
|
| |
* docs/hacking.html.in (Code formatting): Document that // comment
and declaration-after-statement are discouraged.
* HACKING: Regenerate.
|
| |
|
|
|
|
|
|
|
| |
* docs/hacking.html.in (Curly braces): Tighten recommendations to
disallow if (cond) one-line; else { block; }.
* HACKING: Regenerate.
Suggested by Daniel P. Berrange.
|
| |
|
|
|
|
|
|
|
| |
* daemon/libvirtd.c (qemudRunLoop): Pass allocation size, not
current count, to VIR_SHRINK_N.
* docs/hacking.html.in: Update doc example.
* HACKING: Regenerate.
|
|
|
|
|
|
|
|
| |
* src/util/memory.h (VIR_RESIZE_N): New macro.
* src/util/memory.c (virResizeN): New function.
* src/libvirt_private.syms: Export new helper.
* docs/hacking.html.in: Document it.
* HACKING: Regenerate.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* src/util/memory.h (VIR_REALLOC_N): Update docs.
(VIR_EXPAND_N, VIR_SHRINK_N): New macros.
(virAlloc, virAllocN, virReallocN, virAllocVar, virFree): Add some
gcc attributes.
* src/util/memory.c (virExpandN, virShrinkN): New functions.
(virReallocN): Update docs.
* src/libvirt_private.syms: Export new helpers.
* docs/hacking.html.in: Prefer newer interfaces over
VIR_REALLOC_N, since uninitialized memory can bite us.
* HACKING: Regenerate.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* cfg.mk (sc_prohibit_sprintf): New rule.
(sc_prohibit_asprintf): Avoid false positives.
* docs/hacking.html.in (Printf-style functions): Document the
policy.
* HACKING: Regenerate.
* .x-sc_prohibit_sprintf: New exemptions.
* Makefile.am (syntax_check_exceptions): Ship new file.
* src/vbox/vbox_tmpl.c (vboxStartMachine, vboxAttachUSB): Use
virAsprintf instead.
* src/uml/uml_driver.c (umlOpenMonitor): Use snprintf instead.
* tools/virsh.c (cmdDetachInterface): Likewise.
* src/security/security_selinux.c (SELinuxGenSecurityLabel):
Likewise.
* src/openvz/openvz_driver.c (openvzDomainDefineCmd): Likewise,
and ensure large enough buffer.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Similarly to deprecating close(), I am now deprecating fclose() and
introduce VIR_FORCE_FCLOSE() and VIR_FCLOSE(). Also, fdopen() is replaced with
VIR_FDOPEN().
Most of the files are opened in read-only mode, so usage of
VIR_FORCE_CLOSE() seemed appropriate. Others that are opened in write
mode already had the fclose()< 0 check and I converted those to
VIR_FCLOSE()< 0.
I did not find occurrences of possible double-closed files on the way.
|
|
|
|
|
| |
Tweak pre tags to achieve proper indentation of their
plaintext representation. Also use more b/i/code tags.
|
|
|
|
|
|
|
|
| |
Since bugs due to double-closed file descriptors are difficult to track down in a multi-threaded system, I am introducing the VIR_CLOSE(fd) macro to help avoid mistakes here.
There are lots of places where close() is being used. In this patch I am only cleaning up usage of close() in src/conf where the problems were.
I also dare to declare close() as being deprecated in libvirt code base (HACKING).
|
|
|
|
|
|
| |
* docs/hacking.html.in: Use the "curly braces" section from coreutils'
HACKING, adapting for libvirt's different formatting style.
* HACKING: Sync from the above, still mostly manually.
|
|
|
|
| |
xsltproc complained about this.
|
|
|
|
|
| |
* HACKING: Mark as read-only. Soon we'll generate it from...
* docs/hacking.html.in: ... this file. More typo fixes.
|
|
|
|
|
|
|
| |
* doc/hacking.html.in (preprocessor): New section to document
recently-discussed style issues.
Signed-off-by: Eric Blake <eblake@redhat.com>
|
|
|
|
| |
* docs/hacking.html.in (committers): Fix spelling and grammar.
|
|
|
|
|
| |
* Added section on use of goto
* Added missing content from HACKING document
|
| |
|
|
|
|
| |
Instead of refering to __virRaiseError(VIR_ERROR_NO_MEMORY).
|
|
|
|
|
| |
* HACKING: STRCASEEQ is case insensitive.
* docs/hacking.html.in: Likewise.
|
| |
|
|
|
|
|
|
|
| |
Replace free(virBufferContentAndReset()) with virBufferFreeAndReset().
Update documentation and replace all remaining calls to free() with
calls to VIR_FREE(). Also add missing calls to virBufferFreeAndReset()
and virReportOOMError() in OOM error cases.
|
|
|
|
|
|
|
| |
This patch is the result of running the following command in the docs
directory: sed -i 's/\t/ /g; s/\s*$//' *.html.in
* docs/*.html.in:convert tabs into 8 spaces and remove trailing whitespace
|
|
|