Commit Graph

11 Commits

Author SHA1 Message Date
Avi Kivity
a8170e5e97 Rename target_phys_addr_t to hwaddr
target_phys_addr_t is unwieldly, violates the C standard (_t suffixes are
reserved) and its purpose doesn't match the name (most target_phys_addr_t
addresses are not target specific).  Replace it with a finger-friendly,
standards conformant hwaddr.

Outstanding patchsets can be fixed up with the command

  git rebase -i --exec 'find -name "*.[ch]"
                        | xargs s/target_phys_addr_t/hwaddr/g' origin

Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-10-23 08:58:25 -05:00
Jim Meyering
9b9e3ec1b4 doc: update HACKING wrt strncpy/pstrcpy
Reword the section on strncpy: its NUL-filling is important
in some cases.  Mention that pstrcpy's signature is different.

Signed-off-by: Jim Meyering <meyering@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-10-05 07:58:38 -05:00
Peter Maydell
f603a687ff HACKING: clarify allocation/free recommendations
Clarify the allocation/free recommendations; this is mostly
just tidying up following the global-search-and-replace done
with the conversion to the GLib g_malloc and friends.

Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-12-15 09:27:23 -06:00
Blue Swirl
58a06675d3 Convert last qemu_free and qemu_malloc uses
7267c0947d missed
a few cases, fix them.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-08-21 18:42:08 +00:00
Anthony Liguori
145e21dbd0 Update HACKING to refer to g_malloc instead of qemu_malloc
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-08-21 08:16:56 -05:00
Stefan Weil
417131fb9a HACKING: Update status of format checking
Hopefully all functions with printf like arguments now use format checking.

This was tested with default build configuration on linux
and windows hosts (including some cross compilations),
so chances are good that there remain few (if any) functions
without format checking.

Therefore the last comment in HACKING is no longer valid but misleading.

Cc: Blue Swirl <blauwirbel@gmail.com>
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-02-25 16:31:05 -06:00
Blue Swirl
876f256bde HACKING: add rules for printf-like functions
Add rules for printf-like functions, based on libvirt HACKING.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-09-10 18:53:11 +00:00
Blue Swirl
d241f143c9 HACKING: add string management rules
Add string management rules, somewhat like libvirt HACKING.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-09-10 18:53:05 +00:00
Blue Swirl
54b2cc5030 HACKING: add memory management rules
Add memory management rules, somewhat like libvirt HACKING.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-09-10 18:52:52 +00:00
Blue Swirl
84174436a6 HACKING: add C type rules
Add C type rules, adapted from libvirt HACKING. Also include
a description of special QEMU scalar types.

Move typedef rule from CODING_STYLE rule 3 to HACKING rule 6
where it belongs.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-09-10 18:47:31 +00:00
Blue Swirl
45fad878d7 HACKING: add preprocessor rules
Add a new file, HACKING, in order to collect recurring
issues with submitted patches.

Start with preprocessor rules, adapted from libvirt HACKING.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-09-10 18:46:00 +00:00