aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* build: avoid dirty docs on fresh bootstrapEric Blake2012-09-111-5/+6
| | | | * HACKING: Regenerate.
* docs: point out git send-email location, be more stern about make checkLaine Stump2012-09-081-8/+14
| | | | | | | | | | | 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.
* docs: Improve patch submission guidelinesMichal Privoznik2012-07-161-1/+38
| | | | | | We should really advise (new) developers to send rebased patches that apply cleanly and use git-send-email rather than all other obscure ways.
* Document STREQ_NULLABLE and STRNEQ_NULLABLEGuido Günther2011-10-061-0/+7
|
* build: rename files.h to virfile.hEric Blake2011-07-211-1/+1
| | | | | | | | | | | | | | | 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.
* maint: rename virBufferVSprintf to virBufferAsprintfEric Blake2011-05-051-1/+1
| | | | | | | | | | | | | | 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: mention C89 syntax preferencesEric Blake2011-03-301-0/+6
| | | | | | * docs/hacking.html.in (Code formatting): Document that // comment and declaration-after-statement are discouraged. * HACKING: Regenerate.
* Add vim configuration that makes vim auto-indent codeHu Tao2011-03-171-0/+22
|
* maint: document dislike of mismatched if/else bracingEric Blake2011-01-051-13/+22
| | | | | | | * docs/hacking.html.in (Curly braces): Tighten recommendations to disallow if (cond) one-line; else { block; }. * HACKING: Regenerate. Suggested by Daniel P. Berrange.
* doc: Fix spelling of virBufferVSprintfJiri Denemark2010-11-251-1/+1
|
* libvirtd: fix bug when shrinking number of clientsEric Blake2010-11-231-2/+3
| | | | | | | * daemon/libvirtd.c (qemudRunLoop): Pass allocation size, not current count, to VIR_SHRINK_N. * docs/hacking.html.in: Update doc example. * HACKING: Regenerate.
* memory: make it easier to avoid quadratic scaling of arraysEric Blake2010-11-181-6/+39
| | | | | | | | * 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.
* memory: make it safer to expand arraysEric Blake2010-11-181-17/+21
| | | | | | | | | | | | | * 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.
* maint: avoid remaining sprintf usesEric Blake2010-11-171-0/+6
| | | | | | | | | | | | | | | | | | * 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.
* deprecate fclose() and introduce VIR_{FORCE_}FCLOSE()Stefan Berger2010-11-161-6/+27
| | | | | | | | | | | | | 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.
* Generate HACKING from docs/hacking.html.inMatthias Bolte2010-11-121-257/+343
|
* Introduce VIR_CLOSE to be used rather than close()Stefan Berger2010-10-191-0/+17
| | | | | | | | 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: explain why using curly braces well is importantJim Meyering2010-05-041-0/+91
| | | | | | * 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.
* doc: fix typos in hacking.html.in; mark HACKING as read-onlyJim Meyering2010-03-091-0/+3
| | | | | * HACKING: Mark as read-only. Soon we'll generate it from... * docs/hacking.html.in: ... this file. More typo fixes.
* doc: fix more typos in HACKINGJim Meyering2010-03-091-10/+10
| | | | * HACKING: More spelling/typo fixes.
* hacking: add a section on preprocessor conventionsEric Blake2010-03-091-0/+14
| | | | | | | * doc/hacking.html.in (preprocessor): New section to document recently-discussed style issues. Signed-off-by: Eric Blake <eblake@redhat.com>
* hacking: fix typosEric Blake2010-03-091-2/+2
| | | | * docs/hacking.html.in (committers): Fix spelling and grammar.
* Remove conn parameter from virReportOOMErrorMatthias Bolte2010-02-091-5/+5
|
* docs: Refer to virReportOOMError in the HACKING fileMatthias Bolte2010-02-041-11/+11
| | | | Instead of refering to __virRaiseError(VIR_ERROR_NO_MEMORY).
* maint: fix spelling error in hackingEric Blake2010-01-291-2/+2
| | | | | * HACKING: STRCASEEQ is case insensitive. * docs/hacking.html.in: Likewise.
* Replace old CVS references with GITMatthias Bolte2010-01-081-3/+3
|
* Add virBufferFreeAndReset() and replace free()Matthias Bolte2009-12-101-2/+3
| | | | | | | 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.
* tests: Centralize VIR_TEST_DEBUG lookup, and document itCole Robinson2009-10-201-0/+11
| | | | | | | | Provide a simple interface for other tests to lookup the testDebug variable. Also remove a redundant error message in interface tests. If anyone feels inclined to change this env variable to match the existing LIBVIRT_* format, it should now be easier to do so.
* Introduce virStrncpy.Chris Lalancette2009-09-221-0/+31
| | | | | | | | | | | | | | Add the virStrncpy function, which takes a dst string, source string, the number of bytes to copy and the number of bytes available in the dest string. If the source string is too large to fit into the destination string, including the \0 byte, then no data is copied and the function returns NULL. Otherwise, this function copies n bytes from source into dst, including the \0, and returns a pointer to the dst string. This function is intended to replace all unsafe uses of strncpy in the code base, since strncpy does *not* guarantee that the buffer terminates with a \0. Signed-off-by: Chris Lalancette <clalance@redhat.com>
* Fix misc Win32 compile warningsDaniel P. Berrange2009-07-231-1/+1
| | | | | | | | | | | | | | | | | | | GCC >= 4.4 assumes the 'printf' attribute refers to the native runtime libraries format specifiers. Thanks to gnulib, libvirt has GNU format specifiers everywhere. This means we need to use 'gnu_printf' with GCC >= 4.4 to get correct compiler checking of printf format specifiers. * HACKING: Document new rules for ATTRIBUTE_FMT_PRINTF * autobuild.sh, mingw32-libvirt.spec.in: Disable OpenNebula driver on mingw32 builds * qemud/dispatch.h, qemud/qemu.h, src/buf.h src/internal.h, src/logging.h, src/security.h, src/sexpr.h, src/util.h, src/virterror_internal.h, src/xend_internal.c: Change over to ATTRIBUTE_FMT_PRINTF. * src/virsh.c: Disable 'cd' and 'pwd' commands on Win32 since they don't compile * src/threads-win32.c: Add missing return value check
* * HACKING: Clarify "bool" vs. XDR/wire-format.Jim Meyering2009-01-131-1/+4
|
* HACKING: mention bool and other scalar types, const-correctnessJim Meyering2009-01-051-0/+53
|
* let gcc's -Wformat do its job; avoid "make syntax-check" failureJim Meyering2008-12-171-0/+16
| | | | | | * src/util.c (virAsprintf): Remove trailing space. * src/util.h (virAsprintf): Use ATTRIBUTE_FORMAT. * HACKING (Printf-style functions): New section.
* Document somme commit rules, and add application monitoring links to docsDaniel Veillard2008-10-211-2/+34
| | | | | | | * HACKING: update with some rules for commiters * docs/apps.html docs/apps.html.in: add a section on monitoring support daniel
* Link to "how to contribute to open source"Richard W.M. Jones2008-08-011-0/+6
| | | | | * HACKING: Link to external document which describes how to contribute to open source projects.
* General tips for contributing patchesRichard W.M. Jones2008-06-021-1/+41
| | | | | * HACKING: Added section "general tips for contributing patches" to this file.
* Standardize use of header files, making internal.h primary.Richard W.M. Jones2008-05-231-0/+41
| | | | | | | | | | | | | | | | | | * qemud/internal.h, qemud/qemud.h: Rename this file so it doesn't conflict with src/internal.h. * HACKING: Document how header files should be used. * qemud/Makefile.am: Add src/ directory to includes. * qemud/event.c, qemud/mdns.c, qemud/qemud.c, qemud/remote.c, qemud/remote_protocol.c, qemud/remote_protocol.h, qemud/remote_protocol.x, src/buf.c, src/libvirt.c, src/nodeinfo.c, src/qemu_conf.c, src/qemu_driver.c, src/stats_linux.c, src/storage_backend.c, src/storage_backend_fs.c, src/storage_backend_iscsi.c, src/storage_backend_logical.c, src/storage_conf.c, src/storage_driver.c, src/util.c, src/util.h, src/virsh.c, src/virterror.c, src/xend_internal.c, src/xml.c, tests/reconnect.c, tests/xmlrpctest.c, tests/qparamtest.c: Standardize use of header files. * docs/*, po/*: Rebuild docs.
* Added some notes about libvirt string/memory/buffer functionsDaniel P. Berrange2008-05-081-0/+115
|
* HACKING: New file: begin to describe contributor/coding guidelinesJim Meyering2008-04-101-0/+45