libvirt/src/conf
Eric Blake 3e2c3d8f6d build: use correct type for pid and similar types
No thanks to 64-bit windows, with 64-bit pid_t, we have to avoid
constructs like 'int pid'.  Our API in libvirt-qemu cannot be
changed without breaking ABI; but then again, libvirt-qemu can
only be used on systems that support UNIX sockets, which rules
out Windows (even if qemu could be compiled there) - so for all
points on the call chain that interact with this API decision,
we require a different variable name to make it clear that we
audited the use for safety.

Adding a syntax-check rule only solves half the battle; anywhere
that uses printf on a pid_t still needs to be converted, but that
will be a separate patch.

* cfg.mk (sc_correct_id_types): New syntax check.
* src/libvirt-qemu.c (virDomainQemuAttach): Document why we didn't
use pid_t for pid, and validate for overflow.
* include/libvirt/libvirt-qemu.h (virDomainQemuAttach): Tweak name
for syntax check.
* src/vmware/vmware_conf.c (vmwareExtractPid): Likewise.
* src/driver.h (virDrvDomainQemuAttach): Likewise.
* tools/virsh.c (cmdQemuAttach): Likewise.
* src/remote/qemu_protocol.x (qemu_domain_attach_args): Likewise.
* src/qemu_protocol-structs (qemu_domain_attach_args): Likewise.
* src/util/cgroup.c (virCgroupPidCode, virCgroupKillInternal):
Likewise.
* src/qemu/qemu_command.c(qemuParseProcFileStrings): Likewise.
(qemuParseCommandLinePid): Use pid_t for pid.
* daemon/libvirtd.c (daemonForkIntoBackground): Likewise.
* src/conf/domain_conf.h (_virDomainObj): Likewise.
* src/probes.d (rpc_socket_new): Likewise.
* src/qemu/qemu_command.h (qemuParseCommandLinePid): Likewise.
* src/qemu/qemu_driver.c (qemudGetProcessInfo, qemuDomainAttach):
Likewise.
* src/qemu/qemu_process.c (qemuProcessAttach): Likewise.
* src/qemu/qemu_process.h (qemuProcessAttach): Likewise.
* src/uml/uml_driver.c (umlGetProcessInfo): Likewise.
* src/util/virnetdev.h (virNetDevSetNamespace): Likewise.
* src/util/virnetdev.c (virNetDevSetNamespace): Likewise.
* tests/testutils.c (virtTestCaptureProgramOutput): Likewise.
* src/conf/storage_conf.h (_virStoragePerms): Use mode_t, uid_t,
and gid_t rather than int.
* src/security/security_dac.c (virSecurityDACSetOwnership): Likewise.
* src/conf/storage_conf.c (virStorageDefParsePerms): Avoid
compiler warning.
2012-03-02 06:57:43 -07:00
..
capabilities.c caps: Improve error if passed an unknown arch 2012-02-20 13:41:43 -05:00
capabilities.h caps: Improve error if passed an unknown arch 2012-02-20 13:41:43 -05:00
cpu_conf.c cpu: Update guest CPU in host-* mode 2012-01-17 11:42:56 +01:00
cpu_conf.h cpu: Update guest CPU in host-* mode 2012-01-17 11:42:56 +01:00
domain_audit.c Remove single quotes from audit records 2012-02-10 12:14:20 +08:00
domain_audit.h snapshot: make it possible to audit external snapshot 2011-09-05 07:03:05 -06:00
domain_conf.c conf: Introduce new attribute for device address format 2012-02-28 14:27:11 +08:00
domain_conf.h build: use correct type for pid and similar types 2012-03-02 06:57:43 -07:00
domain_event.c events: Return the correct number of registered events 2012-01-13 13:59:48 -07:00
domain_event.h Only add the timer when a callback is registered 2011-12-19 11:08:25 +00:00
domain_nwfilter.c Pass the VM's UUID into the nwfilter subsystem 2011-12-08 21:35:20 -05:00
domain_nwfilter.h Pass the VM's UUID into the nwfilter subsystem 2011-12-08 21:35:20 -05:00
interface_conf.c conf: Improve incorrect root element error messages 2011-11-28 15:12:37 +01:00
interface_conf.h interface: implement a test driver for network config transaction API. 2011-05-27 14:34:13 -04:00
netdev_bandwidth_conf.c Split src/util/network.{c,h} into 5 pieces 2011-11-15 10:27:54 +00:00
netdev_bandwidth_conf.h Split src/util/network.{c,h} into 5 pieces 2011-11-15 10:27:54 +00:00
netdev_vport_profile_conf.c network: support Open vSwitch 2012-02-15 16:04:54 -05:00
netdev_vport_profile_conf.h Split src/util/network.{c,h} into 5 pieces 2011-11-15 10:27:54 +00:00
network_conf.c build: prohibit raw malloc and free 2012-02-03 10:41:45 -07:00
network_conf.h Move virMacAddrXXX functions to src/util/virmacaddr.[ch] 2012-01-27 17:56:10 +00:00
node_device_conf.c npiv: Auto-generate WWN if it's not specified 2012-02-10 12:53:25 +08:00
node_device_conf.h npiv: Auto-generate WWN if it's not specified 2012-02-10 12:53:25 +08:00
nwfilter_conf.c Rename virXXXXMacAddr to virMacAddrXXX 2012-01-27 17:53:44 +00:00
nwfilter_conf.h nwfilter: Force instantiation of filters upon driver reload 2012-01-27 08:19:58 -05:00
nwfilter_params.c build: avoid spurious compiler warning 2012-01-11 06:32:52 -07:00
nwfilter_params.h Rename hash.h and hash.c to virhash.h and virhash.c 2012-01-26 14:11:13 +00:00
secret_conf.c conf: Improve incorrect root element error messages 2011-11-28 15:12:37 +01:00
secret_conf.h secret: add Ceph secret type 2011-10-28 11:34:17 -06:00
storage_conf.c build: use correct type for pid and similar types 2012-03-02 06:57:43 -07:00
storage_conf.h build: use correct type for pid and similar types 2012-03-02 06:57:43 -07:00
storage_encryption_conf.c snapshot: simplify indentation of disk encryption xml 2011-10-26 11:14:43 -06:00
storage_encryption_conf.h snapshot: simplify indentation of disk encryption xml 2011-10-26 11:14:43 -06:00
virconsole.c util: Add helpers for safe domain console operations 2012-02-27 15:05:17 +01:00
virconsole.h util: Add helpers for safe domain console operations 2012-02-27 15:05:17 +01:00