Right-aligning backslashes when defining macros or using complex commands in Makefiles looks cute, but as soon as any changes is required to the code you end up with either distractingly broken alignment or unnecessarily big diffs where most of the changes are just pushing all backslashes a few characters to one side. Generated using $ git grep -El '[[:blank:]][[:blank:]]\\$' | \ grep -E '*\.([chx]|am|mk)$$' | \ while read f; do \ sed -Ei 's/[[:blank:]]*[[:blank:]]\\$/ \\/g' "$f"; \ done Signed-off-by: Andrea Bolognani <abologna@xxxxxxxxxx> --- I'm only including the first few hunks to avoid running into mailing list size limits; it's all automatically generated anyway. The full patch can be retrieved from https://github.com/andreabolognani/libvirt.git in the 'prohibit-backslash-alignment' branch. Makefile.am | 10 +- cfg.mk | 824 ++++++++-------- config-post.h | 2 +- daemon/Makefile.am | 172 ++-- daemon/remote.c | 46 +- docs/Makefile.am | 56 +- examples/Makefile.am | 2 +- examples/domsuspend/suspend.c | 26 +- examples/domtop/domtop.c | 26 +- examples/object-events/event-test.c | 8 +- src/Makefile.am | 1510 ++++++++++++++--------------- src/access/viraccessdriverpolkit.c | 4 +- src/access/viraccessmanager.c | 4 +- src/conf/cpu_conf.c | 4 +- src/conf/domain_capabilities.c | 32 +- src/conf/domain_capabilities.h | 12 +- src/conf/domain_conf.c | 62 +- src/conf/interface_conf.h | 2 +- src/conf/network_conf.h | 10 +- src/conf/secret_conf.h | 6 +- src/conf/snapshot_conf.h | 10 +- src/conf/storage_conf.h | 12 +- src/conf/virdomainobjlist.h | 14 +- src/cpu/cpu_x86.c | 48 +- src/datatypes.c | 12 +- src/datatypes.h | 590 +++++------ src/driver.h | 4 +- src/esx/esx_driver.c | 8 +- src/esx/esx_vi.c | 258 ++--- src/esx/esx_vi.h | 42 +- src/esx/esx_vi_methods.c | 196 ++-- src/esx/esx_vi_types.c | 1094 ++++++++++----------- src/internal.h | 260 ++--- src/libxl/libxl_domain.h | 4 +- src/libxl/libxl_driver.c | 40 +- src/libxl/libxl_migration.h | 14 +- src/locking/lock_driver.h | 6 +- src/locking/lock_manager.c | 20 +- src/lxc/lxc_driver.c | 30 +- src/node_device/node_device_udev.c | 20 +- src/nwfilter/nwfilter_ebiptables_driver.c | 60 +- src/openvz/openvz_driver.h | 4 +- src/phyp/phyp_driver.c | 8 +- src/qemu/qemu_command.c | 8 +- src/qemu/qemu_conf.c | 84 +- src/qemu/qemu_domain.c | 20 +- src/qemu/qemu_domain.h | 20 +- src/qemu/qemu_driver.c | 226 ++--- src/qemu/qemu_migration.c | 40 +- src/qemu/qemu_migration.h | 66 +- src/qemu/qemu_monitor.c | 44 +- src/qemu/qemu_monitor_json.c | 102 +- src/qemu/qemu_monitor_text.c | 18 +- src/qemu/qemu_parse_command.c | 12 +- src/remote/remote_driver.c | 56 +- src/rpc/virnetclient.c | 8 +- src/security/security_manager.h | 2 +- src/storage/storage_backend.c | 4 +- src/util/viralloc.h | 32 +- src/util/viratomic.h | 114 +-- src/util/viraudit.h | 8 +- src/util/vircommand.c | 4 +- src/util/virconf.c | 8 +- src/util/virdbus.c | 70 +- src/util/virdnsmasq.h | 10 +- src/util/virendian.h | 56 +- src/util/virerror.h | 180 ++-- src/util/virfile.h | 12 +- src/util/virfirewall.c | 38 +- src/util/virhash.c | 8 +- src/util/virlog.c | 10 +- src/util/virlog.h | 30 +- src/util/virnetdev.c | 4 +- src/util/virnetdevopenvswitch.c | 40 +- src/util/virobject.c | 26 +- src/util/virpci.c | 6 +- src/util/virprobe.h | 60 +- src/util/virsocketaddr.h | 6 +- src/util/virstring.h | 2 +- src/util/virsysinfo.c | 14 +- src/util/virsystemd.c | 20 +- src/util/virthread.h | 48 +- src/util/virtypedparam.c | 18 +- src/util/virtypedparam.h | 26 +- src/util/virutil.h | 30 +- src/util/viruuid.h | 18 +- src/util/virxml.c | 4 +- src/util/virxml.h | 12 +- src/vbox/vbox_CAPI_v4_0.h | 6 +- src/vbox/vbox_CAPI_v4_1.h | 6 +- src/vbox/vbox_CAPI_v4_2.h | 6 +- src/vbox/vbox_CAPI_v4_2_20.h | 6 +- src/vbox/vbox_CAPI_v4_3.h | 6 +- src/vbox/vbox_CAPI_v4_3_4.h | 6 +- src/vbox/vbox_CAPI_v5_0.h | 2 +- src/vbox/vbox_CAPI_v5_1.h | 2 +- src/vbox/vbox_common.h | 104 +- src/vbox/vbox_tmpl.c | 36 +- src/vmx/vmx.c | 4 +- src/vz/vz_driver.c | 70 +- src/vz/vz_sdk.c | 80 +- src/vz/vz_utils.h | 22 +- src/xen/xen_driver.c | 4 +- src/xen/xen_driver.h | 8 +- src/xen/xen_hypervisor.c | 398 ++++---- tests/Makefile.am | 78 +- tests/bhyveargv2xmltest.c | 24 +- tests/bhyvexml2argvtest.c | 20 +- tests/bhyvexml2xmltest.c | 12 +- tests/commandtest.c | 6 +- tests/cputest.c | 160 +-- tests/domaincapstest.c | 128 +-- tests/domainconftest.c | 16 +- tests/domainsnapshotxml2xmltest.c | 14 +- tests/esxutilstest.c | 12 +- tests/genericxml2xmltest.c | 14 +- tests/interfacexml2xmltest.c | 6 +- tests/libxlxml2domconfigtest.c | 16 +- tests/lxcconf2xmltest.c | 12 +- tests/lxcxml2xmltest.c | 14 +- tests/metadatatest.c | 18 +- tests/networkxml2conftest.c | 20 +- tests/networkxml2firewalltest.c | 16 +- tests/networkxml2xmltest.c | 12 +- tests/networkxml2xmlupdatetest.c | 32 +- tests/nodedevxml2xmltest.c | 6 +- tests/nsstest.c | 16 +- tests/nwfilterxml2firewalltest.c | 16 +- tests/nwfilterxml2xmltest.c | 18 +- tests/openvzutilstest.c | 12 +- tests/qemuagenttest.c | 4 +- tests/qemuargv2xmltest.c | 14 +- tests/qemucapabilitiestest.c | 18 +- tests/qemucaps2xmltest.c | 8 +- tests/qemucapsprobemock.c | 14 +- tests/qemucommandutiltest.c | 22 +- tests/qemuhelptest.c | 24 +- tests/qemuhotplugtest.c | 94 +- tests/qemumonitorjsontest.c | 346 +++---- tests/qemumonitortest.c | 12 +- tests/qemuxml2argvtest.c | 60 +- tests/qemuxml2xmltest.c | 48 +- tests/secretxml2xmltest.c | 12 +- tests/securityselinuxlabeltest.c | 4 +- tests/securityselinuxtest.c | 24 +- tests/sexpr2xmltest.c | 14 +- tests/sockettest.c | 132 +-- tests/storagebackendsheepdogtest.c | 38 +- tests/storagepoolxml2xmltest.c | 6 +- tests/storagevolxml2argvtest.c | 18 +- tests/storagevolxml2xmltest.c | 14 +- tests/testutils.h | 64 +- tests/utiltest.c | 24 +- tests/vboxsnapshotxmltest.c | 6 +- tests/virauthconfigtest.c | 14 +- tests/virbitmaptest.c | 44 +- tests/virbuftest.c | 72 +- tests/vircaps2xmltest.c | 12 +- tests/vircgroupmock.c | 28 +- tests/vircgrouptest.c | 40 +- tests/virconftest.c | 30 +- tests/vircryptotest.c | 40 +- tests/virdbustest.c | 36 +- tests/virdrivermoduletest.c | 12 +- tests/virfilecachetest.c | 14 +- tests/virfiletest.c | 44 +- tests/virfilewrapper.c | 14 +- tests/virfirewalltest.c | 96 +- tests/virhashtest.c | 22 +- tests/virhostdevtest.c | 28 +- tests/viriscsitest.c | 20 +- tests/virjsontest.c | 14 +- tests/virkeycodetest.c | 32 +- tests/virkmodtest.c | 14 +- tests/virlogtest.c | 26 +- tests/virmacmaptest.c | 66 +- tests/virmock.h | 186 ++-- tests/virnetdaemontest.c | 16 +- tests/virnetdevbandwidthtest.c | 60 +- tests/virnetdevtest.c | 12 +- tests/virnettlscontexttest.c | 52 +- tests/virnettlshelpers.c | 36 +- tests/virnettlssessiontest.c | 90 +- tests/virpcimock.c | 32 +- tests/virpcitest.c | 80 +- tests/virschematest.c | 80 +- tests/virscsitest.c | 10 +- tests/virshtest.c | 14 +- tests/virstoragetest.c | 98 +- tests/virstorageutiltest.c | 30 +- tests/virstringtest.c | 232 ++--- tests/virsystemdtest.c | 72 +- tests/virtimetest.c | 66 +- tests/viruritest.c | 24 +- tests/virusbtest.c | 36 +- tests/vmwarevertest.c | 16 +- tests/vmx2xmltest.c | 16 +- tests/xlconfigtest.c | 40 +- tests/xmconfigtest.c | 32 +- tests/xml2sexprtest.c | 14 +- tests/xml2vmxtest.c | 16 +- tools/Makefile.am | 252 ++--- tools/nss/libvirt_nss.c | 22 +- tools/virsh-domain-monitor.c | 16 +- tools/virsh-domain.c | 144 +-- tools/virsh-interface.c | 22 +- tools/virsh-interface.h | 4 +- tools/virsh-network.c | 26 +- tools/virsh-network.h | 4 +- tools/virsh-nwfilter.c | 14 +- tools/virsh-nwfilter.h | 4 +- tools/virsh-pool.c | 200 ++-- tools/virsh-pool.h | 4 +- tools/virsh-snapshot.c | 40 +- tools/virsh-volume.c | 36 +- tools/virsh-volume.h | 4 +- tools/virsh.h | 76 +- tools/virt-admin.c | 32 +- tools/virt-host-validate-bhyve.c | 18 +- tools/vsh.h | 136 +-- tools/wireshark/src/packet-libvirt.c | 30 +- 221 files changed, 6421 insertions(+), 6421 deletions(-) diff --git a/Makefile.am b/Makefile.am index d042e9a31..5a805b5ee 100644 --- a/Makefile.am +++ b/Makefile.am @@ -97,11 +97,11 @@ dist-hook: gen-ChangeLog gen-AUTHORS gen_start_date = 2009-07-04 .PHONY: gen-ChangeLog gen-ChangeLog: - $(AM_V_GEN)if test -d .git; then \ - $(top_srcdir)/build-aux/gitlog-to-changelog \ - --since=$(gen_start_date) > $(distdir)/cl-t; \ - rm -f $(distdir)/ChangeLog; \ - mv $(distdir)/cl-t $(distdir)/ChangeLog; \ + $(AM_V_GEN)if test -d .git; then \ + $(top_srcdir)/build-aux/gitlog-to-changelog \ + --since=$(gen_start_date) > $(distdir)/cl-t; \ + rm -f $(distdir)/ChangeLog; \ + mv $(distdir)/cl-t $(distdir)/ChangeLog; \ fi .PHONY: gen-AUTHORS diff --git a/cfg.mk b/cfg.mk index 8ad09e7da..d5db05f68 100644 --- a/cfg.mk +++ b/cfg.mk @@ -42,40 +42,40 @@ generated_files = \ _test_script_regex = \<\(init\|test-lib\)\.sh\> # Tests not to run as part of "make distcheck". -local-checks-to-skip = \ - changelog-check \ - makefile-check \ - makefile_path_separator_check \ - patch-check \ - sc_GPL_version \ - sc_always_defined_macros \ - sc_cast_of_alloca_return_value \ - sc_cross_check_PATH_usage_in_tests \ - sc_dd_max_sym_length \ - sc_error_exit_success \ - sc_file_system \ - sc_immutable_NEWS \ - sc_makefile_path_separator_check \ - sc_obsolete_symbols \ - sc_prohibit_S_IS_definition \ - sc_prohibit_atoi_atof \ - sc_prohibit_hash_without_use \ - sc_prohibit_jm_in_m4 \ - sc_prohibit_quote_without_use \ - sc_prohibit_quotearg_without_use \ - sc_prohibit_stat_st_blocks \ - sc_prohibit_undesirable_word_seq \ - sc_root_tests \ - sc_space_tab \ - sc_sun_os_names \ - sc_system_h_headers \ - sc_texinfo_acronym \ - sc_tight_scope \ - sc_two_space_separator_in_usage \ - sc_error_message_uppercase \ - sc_program_name \ - sc_require_test_exit_idiom \ - sc_makefile_check \ +local-checks-to-skip = \ + changelog-check \ + makefile-check \ + makefile_path_separator_check \ + patch-check \ + sc_GPL_version \ + sc_always_defined_macros \ + sc_cast_of_alloca_return_value \ + sc_cross_check_PATH_usage_in_tests \ + sc_dd_max_sym_length \ + sc_error_exit_success \ + sc_file_system \ + sc_immutable_NEWS \ + sc_makefile_path_separator_check \ + sc_obsolete_symbols \ + sc_prohibit_S_IS_definition \ + sc_prohibit_atoi_atof \ + sc_prohibit_hash_without_use \ + sc_prohibit_jm_in_m4 \ + sc_prohibit_quote_without_use \ + sc_prohibit_quotearg_without_use \ + sc_prohibit_stat_st_blocks \ + sc_prohibit_undesirable_word_seq \ + sc_root_tests \ + sc_space_tab \ + sc_sun_os_names \ + sc_system_h_headers \ + sc_texinfo_acronym \ + sc_tight_scope \ + sc_two_space_separator_in_usage \ + sc_error_message_uppercase \ + sc_program_name \ + sc_require_test_exit_idiom \ + sc_makefile_check \ sc_useless_cpp_parens # Most developers don't run 'make distcheck'. We want the official @@ -94,91 +94,91 @@ VC_LIST_ALWAYS_EXCLUDE_REGEX = \ (^(docs/(news(-[0-9]*)?\.html\.in|.*\.patch))|\.(po|fig|gif|ico|png))$$ # Functions like free() that are no-ops on NULL arguments. -useless_free_options = \ - --name=VBOX_UTF16_FREE \ - --name=VBOX_UTF8_FREE \ - --name=VBOX_COM_UNALLOC_MEM \ - --name=VIR_FREE \ - --name=qemuCapsFree \ - --name=qemuMigrationCookieFree \ - --name=qemuMigrationCookieGraphicsFree \ - --name=sexpr_free \ - --name=usbFreeDevice \ - --name=virBandwidthDefFree \ - --name=virBitmapFree \ - --name=virCPUDefFree \ - --name=virCapabilitiesFree \ - --name=virCapabilitiesFreeGuest \ - --name=virCapabilitiesFreeGuestDomain \ - --name=virCapabilitiesFreeGuestFeature \ - --name=virCapabilitiesFreeGuestMachine \ - --name=virCapabilitiesFreeHostNUMACell \ - --name=virCapabilitiesFreeMachines \ - --name=virCgroupFree \ - --name=virCommandFree \ - --name=virConfFreeList \ - --name=virConfFreeValue \ - --name=virDomainActualNetDefFree \ - --name=virDomainChrDefFree \ - --name=virDomainChrSourceDefFree \ - --name=virDomainControllerDefFree \ - --name=virDomainDefFree \ - --name=virDomainDeviceDefFree \ - --name=virDomainDiskDefFree \ - --name=virDomainEventCallbackListFree \ - --name=virObjectEventQueueFree \ - --name=virDomainFSDefFree \ - --name=virDomainGraphicsDefFree \ - --name=virDomainHostdevDefFree \ - --name=virDomainInputDefFree \ - --name=virDomainNetDefFree \ - --name=virDomainObjFree \ - --name=virDomainSmartcardDefFree \ - --name=virDomainSnapshotDefFree \ - --name=virDomainSnapshotObjFree \ - --name=virDomainSoundDefFree \ - --name=virDomainVideoDefFree \ - --name=virDomainWatchdogDefFree \ - --name=virFileDirectFdFree \ - --name=virHashFree \ - --name=virInterfaceDefFree \ - --name=virInterfaceIpDefFree \ - --name=virInterfaceObjFree \ - --name=virInterfaceProtocolDefFree \ - --name=virJSONValueFree \ - --name=virLastErrFreeData \ - --name=virNetMessageFree \ - --name=virNetServerMDNSFree \ - --name=virNetServerMDNSEntryFree \ - --name=virNetServerMDNSGroupFree \ - --name=virNWFilterDefFree \ - --name=virNWFilterEntryFree \ - --name=virNWFilterHashTableFree \ - --name=virNWFilterIPAddrLearnReqFree \ - --name=virNWFilterIncludeDefFree \ - --name=virNWFilterObjFree \ - --name=virNWFilterRuleDefFree \ - --name=virNWFilterRuleInstFree \ - --name=virNetworkDefFree \ - --name=virNodeDeviceDefFree \ - --name=virNodeDeviceObjFree \ - --name=virObjectUnref \ - --name=virObjectFreeCallback \ - --name=virPCIDeviceFree \ - --name=virSecretDefFree \ - --name=virStorageEncryptionFree \ - --name=virStorageEncryptionSecretFree \ - --name=virStorageFileFreeMetadata \ - --name=virStoragePoolDefFree \ - --name=virStoragePoolObjFree \ - --name=virStoragePoolSourceFree \ - --name=virStorageVolDefFree \ - --name=virThreadPoolFree \ - --name=xmlBufferFree \ - --name=xmlFree \ - --name=xmlFreeDoc \ - --name=xmlFreeNode \ - --name=xmlXPathFreeContext \ +useless_free_options = \ + --name=VBOX_UTF16_FREE \ + --name=VBOX_UTF8_FREE \ + --name=VBOX_COM_UNALLOC_MEM \ + --name=VIR_FREE \ + --name=qemuCapsFree \ + --name=qemuMigrationCookieFree \ + --name=qemuMigrationCookieGraphicsFree \ + --name=sexpr_free \ + --name=usbFreeDevice \ + --name=virBandwidthDefFree \ + --name=virBitmapFree \ + --name=virCPUDefFree \ + --name=virCapabilitiesFree \ + --name=virCapabilitiesFreeGuest \ + --name=virCapabilitiesFreeGuestDomain \ + --name=virCapabilitiesFreeGuestFeature \ + --name=virCapabilitiesFreeGuestMachine \ + --name=virCapabilitiesFreeHostNUMACell \ + --name=virCapabilitiesFreeMachines \ + --name=virCgroupFree \ + --name=virCommandFree \ + --name=virConfFreeList \ + --name=virConfFreeValue \ + --name=virDomainActualNetDefFree \ + --name=virDomainChrDefFree \ + --name=virDomainChrSourceDefFree \ + --name=virDomainControllerDefFree \ + --name=virDomainDefFree \ + --name=virDomainDeviceDefFree \ + --name=virDomainDiskDefFree \ + --name=virDomainEventCallbackListFree \ + --name=virObjectEventQueueFree \ + --name=virDomainFSDefFree \ + --name=virDomainGraphicsDefFree \ + --name=virDomainHostdevDefFree \ + --name=virDomainInputDefFree \ + --name=virDomainNetDefFree \ + --name=virDomainObjFree \ + --name=virDomainSmartcardDefFree \ + --name=virDomainSnapshotDefFree \ + --name=virDomainSnapshotObjFree \ + --name=virDomainSoundDefFree \ + --name=virDomainVideoDefFree \ + --name=virDomainWatchdogDefFree \ + --name=virFileDirectFdFree \ + --name=virHashFree \ + --name=virInterfaceDefFree \ + --name=virInterfaceIpDefFree \ + --name=virInterfaceObjFree \ + --name=virInterfaceProtocolDefFree \ + --name=virJSONValueFree \ + --name=virLastErrFreeData \ + --name=virNetMessageFree \ + --name=virNetServerMDNSFree \ + --name=virNetServerMDNSEntryFree \ + --name=virNetServerMDNSGroupFree \ + --name=virNWFilterDefFree \ + --name=virNWFilterEntryFree \ + --name=virNWFilterHashTableFree \ + --name=virNWFilterIPAddrLearnReqFree \ + --name=virNWFilterIncludeDefFree \ + --name=virNWFilterObjFree \ + --name=virNWFilterRuleDefFree \ + --name=virNWFilterRuleInstFree \ + --name=virNetworkDefFree \ + --name=virNodeDeviceDefFree \ + --name=virNodeDeviceObjFree \ + --name=virObjectUnref \ + --name=virObjectFreeCallback \ + --name=virPCIDeviceFree \ + --name=virSecretDefFree \ + --name=virStorageEncryptionFree \ + --name=virStorageEncryptionSecretFree \ + --name=virStorageFileFreeMetadata \ + --name=virStoragePoolDefFree \ + --name=virStoragePoolObjFree \ + --name=virStoragePoolSourceFree \ + --name=virStorageVolDefFree \ + --name=virThreadPoolFree \ + --name=xmlBufferFree \ + --name=xmlFree \ + --name=xmlFreeDoc \ + --name=xmlFreeNode \ + --name=xmlXPathFreeContext \ --name=xmlXPathFreeObject # The following template was generated by this command: -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list