[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH] wrap some long lines



ping ...

在 2013-02-19二的 10:22 +0800,liguang写道:
> Signed-off-by: liguang <lig fnst cn fujitsu com>
> ---
>  src/qemu/qemu_command.c |   71 ++++++++++++++++++++++++++++++----------------
>  1 files changed, 46 insertions(+), 25 deletions(-)
> 
> diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
> index 9ad3c77..ad62120 100644
> --- a/src/qemu/qemu_command.c
> +++ b/src/qemu/qemu_command.c
> @@ -611,7 +611,8 @@ qemuAssignDeviceNetAlias(virDomainDefPtr def, virDomainNetDefPtr net, int idx)
>              }
>              if ((thisidx = qemuDomainDeviceAliasIndex(&def->nets[i]->info, "net")) < 0) {
>                  virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
> -                               _("Unable to determine device index for network device"));
> +                               _("Unable to determine device index for "
> +                                 "network device"));
>                  return -1;
>              }
>              if (thisidx >= idx)
> @@ -638,7 +639,8 @@ qemuAssignDeviceHostdevAlias(virDomainDefPtr def, virDomainHostdevDefPtr hostdev
>              int thisidx;
>              if ((thisidx = qemuDomainDeviceAliasIndex(def->hostdevs[i]->info, "hostdev")) < 0) {
>                  virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
> -                               _("Unable to determine device index for hostdev device"));
> +                               _("Unable to determine device index for "
> +                                 "hostdev device"));
>                  return -1;
>              }
>              if (thisidx >= idx)
> @@ -665,7 +667,8 @@ qemuAssignDeviceRedirdevAlias(virDomainDefPtr def, virDomainRedirdevDefPtr redir
>              int thisidx;
>              if ((thisidx = qemuDomainDeviceAliasIndex(&def->redirdevs[i]->info, "redir")) < 0) {
>                  virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
> -                               _("Unable to determine device index for redirected device"));
> +                               _("Unable to determine device index for"
> +                                 " redirected device"));
>                  return -1;
>              }
>              if (thisidx >= idx)
> @@ -1001,8 +1004,8 @@ static int qemuCollectPCIAddress(virDomainDefPtr def ATTRIBUTE_UNUSED,
>          if (info->addr.pci.function != 0) {
>              virReportError(VIR_ERR_XML_ERROR,
>                             _("Attempted double use of PCI Address '%s' "
> -                             "(may need \"multifunction='on'\" for device on function 0)"),
> -                           addr);
> +                             "(may need \"multifunction='on'\" for "
> +                             "device on function 0)"), addr);
>          } else {
>              virReportError(VIR_ERR_XML_ERROR,
>                             _("Attempted double use of PCI Address '%s'"), addr);
> @@ -1036,7 +1039,8 @@ static int qemuCollectPCIAddress(virDomainDefPtr def ATTRIBUTE_UNUSED,
>                  goto cleanup;
>              }
>  
> -            VIR_DEBUG("Remembering PCI addr %s (multifunction=off for function 0)", addr);
> +            VIR_DEBUG("Remembering PCI addr %s (multifunction=off"
> +                      " for function 0)", addr);
>              if (virHashAddEntry(addrs->used, addr, addr))
>                  goto cleanup;
>              addr = NULL;
> @@ -1468,7 +1472,8 @@ qemuAssignDevicePCISlots(virDomainDefPtr def,
>                      def->controllers[i]->info.addr.pci.slot != 1 ||
>                      def->controllers[i]->info.addr.pci.function != 2) {
>                      virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
> -                                   _("PIIX3 USB controller must have PCI address 0:0:1.2"));
> +                                   _("PIIX3 USB controller must have"
> +                                     " PCI address 0:0:1.2"));
>                      goto error;
>                  }
>                  reservedUSB = true;
> @@ -1524,7 +1529,8 @@ qemuAssignDevicePCISlots(virDomainDefPtr def,
>                  primaryVideo->info.addr.pci.slot != 2 ||
>                  primaryVideo->info.addr.pci.function != 0) {
>                  virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
> -                               _("Primary video card must have PCI address 0:0:2.0"));
> +                               _("Primary video card must have "
> +                                 "PCI address 0:0:2.0"));
>                  goto error;
>              }
>              /* If TYPE==PCI, then qemuCollectPCIAddress() function
> @@ -1814,12 +1820,14 @@ qemuBuildRomStr(virBufferPtr buf,
>      if (info->rombar || info->romfile) {
>          if (info->type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI) {
>              virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
> -                           "%s", _("rombar and romfile are supported only for PCI devices"));
> +                           "%s", _("rombar and romfile are supported "
> +                                   "only for PCI devices"));
>              return -1;
>          }
>          if (!qemuCapsGet(caps, QEMU_CAPS_PCI_ROMBAR)) {
>              virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
> -                           "%s", _("rombar and romfile not supported in this QEMU binary"));
> +                           "%s", _("rombar and romfile not supported "
> +                                   "in this QEMU binary"));
>              return -1;
>          }
>  
> @@ -1900,8 +1908,8 @@ qemuBuildRBDString(virConnectPtr conn,
>                                                            VIR_SECRET_GET_VALUE_INTERNAL_CALL);
>              if (secret == NULL) {
>                  virReportError(VIR_ERR_INTERNAL_ERROR,
> -                               _("could not get the value of the secret for username %s"),
> -                               disk->auth.username);
> +                               _("could not get the value of the secret for "
> +                                 "username %s"), disk->auth.username);
>                  goto error;
>              }
>              /* qemu/librbd wants it base64 encoded */
> @@ -2330,7 +2338,8 @@ qemuBuildDriveStr(virConnectPtr conn ATTRIBUTE_UNUSED,
>              }
>              if (!disk->readonly) {
>                  virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
> -                               _("cannot create virtual FAT disks in read-write mode"));
> +                               _("cannot create virtual FAT disks "
> +                                 "in read-write mode"));
>                  goto error;
>              }
>              if (disk->device == VIR_DOMAIN_DISK_DEVICE_FLOPPY)
> @@ -3231,7 +3240,8 @@ qemuBuildNicDevStr(virDomainNetDefPtr net,
>              }
>          } else {
>              virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
> -                           _("virtio-net-pci 'tx' option not supported in this QEMU binary"));
> +                           _("virtio-net-pci 'tx' option not supported "
> +                             "in this QEMU binary"));
>              goto error;
>          }
>      }
> @@ -3538,7 +3548,8 @@ qemuBuildSoundCodecStr(virDomainSoundDefPtr sound,
>      }
>  
>      virBufferAsprintf(&buf, "%s,id=%s-codec%d,bus=%s.0,cad=%d",
> -                      stype, sound->info.alias, codec->cad, sound->info.alias, codec->cad);
> +                      stype, sound->info.alias, codec->cad,
> +                      sound->info.alias, codec->cad);
>  
>      return virBufferContentAndReset(&buf);
>  
> @@ -4978,7 +4989,9 @@ qemuBuildGraphicsCommandLine(virQEMUDriverPtr driver,
>              case VIR_DOMAIN_GRAPHICS_SPICE_CHANNEL_MODE_SECURE:
>                  if (!driver->spiceTLS) {
>                      virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
> -                                   _("spice secure channels set in XML configuration, but TLS is disabled in qemu.conf"));
> +                                   _("spice secure channels set in XML "
> +                                     "configuration, but TLS is disabled "
> +                                     "in qemu.conf"));
>                      goto error;
>                  }
>                  virBufferAsprintf(&opt, ",tls-channel=%s",
> @@ -5218,7 +5231,8 @@ qemuBuildCommandLine(virConnectPtr conn,
>          }
>          if (!driver->hugepage_path) {
>              virReportError(VIR_ERR_INTERNAL_ERROR,
> -                           "%s", _("hugepages are disabled by administrator config"));
> +                           "%s", _("hugepages are disabled by "
> +                                   "administrator config"));
>              goto error;
>          }
>          if (!qemuCapsGet(caps, QEMU_CAPS_MEM_PATH)) {
> @@ -5268,7 +5282,8 @@ qemuBuildCommandLine(virConnectPtr conn,
>  
>          if (!qemuCapsGet(caps, QEMU_CAPS_SMBIOS_TYPE)) {
>              virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
> -                           _("the QEMU binary %s does not support smbios settings"),
> +                           _("the QEMU binary %s does not support "
> +                             "smbios settings"),
>                             emulator);
>              goto error;
>          }
> @@ -6386,7 +6401,8 @@ qemuBuildCommandLine(virConnectPtr conn,
>              if (!qemuCapsGet(caps, QEMU_CAPS_CHARDEV) ||
>                  !qemuCapsGet(caps, QEMU_CAPS_DEVICE)) {
>                  virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
> -                               "%s", _("guestfwd requires QEMU to support -chardev & -device"));
> +                               "%s", _("guestfwd requires QEMU to support "
> +                                       "-chardev & -device"));
>                  goto error;
>              }
>  
> @@ -6405,8 +6421,9 @@ qemuBuildCommandLine(virConnectPtr conn,
>  
>              virCommandAddArg(cmd, "-netdev");
>              virCommandAddArgFormat(cmd,
> -                                   "user,guestfwd=tcp:%s:%i,chardev=char%s,id=user-%s",
> -                                   addr, port, channel->info.alias,
> +                                   "user,guestfwd=tcp:%s:%i,chardev=char%s, "
> +                                   "id=user-%s", addr, port,
> +                                   channel->info.alias,
>                                     channel->info.alias);
>              VIR_FREE(addr);
>              break;
> @@ -6414,7 +6431,8 @@ qemuBuildCommandLine(virConnectPtr conn,
>          case VIR_DOMAIN_CHR_CHANNEL_TARGET_TYPE_VIRTIO:
>              if (!qemuCapsGet(caps, QEMU_CAPS_DEVICE)) {
>                  virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
> -                               _("virtio channel requires QEMU to support -device"));
> +                               _("virtio channel requires QEMU to support "
> +                                 "-device"));
>                  goto error;
>              }
>  
> @@ -6643,7 +6661,8 @@ qemuBuildCommandLine(virConnectPtr conn,
>                          char *str;
>                          if (def->videos[i]->type != VIR_DOMAIN_VIDEO_TYPE_QXL) {
>                              virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
> -                                           _("video type %s is only valid as primary video card"),
> +                                           _("video type %s is only valid as "
> +                                             "primary video card"),
>                                             virDomainVideoTypeToString(def->videos[0]->type));
>                              goto error;
>                          }
> @@ -6930,7 +6949,8 @@ qemuBuildCommandLine(virConnectPtr conn,
>                  VIR_FREE(devstr);
>              } else {
>                  virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
> -                               _("PCI device assignment is not supported by this version of qemu"));
> +                               _("PCI device assignment is not supported by "
> +                                 "this version of qemu"));
>                  goto error;
>              }
>          }
> @@ -7010,7 +7030,8 @@ qemuBuildCommandLine(virConnectPtr conn,
>          def->memballoon->model != VIR_DOMAIN_MEMBALLOON_MODEL_NONE) {
>          if (def->memballoon->model != VIR_DOMAIN_MEMBALLOON_MODEL_VIRTIO) {
>              virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
> -                           _("Memory balloon device type '%s' is not supported by this version of qemu"),
> +                           _("Memory balloon device type '%s' is not supported "
> +                             "by this version of qemu"),
>                             virDomainMemballoonModelTypeToString(def->memballoon->model));
>              goto error;
>          }
> -- 
> 1.7.2.5
> 




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]