let log_entry = str_entry "firmware_dir"
- (* Each enty in the config is one of the following three ... *)
+ (* Each entry in the config is one of the following three ... *)
let entry = log_entry
let comment = [ label "#comment" . del /#[ \t]*/ "# " . store /([^ \t\n][^\n]*)?/ . del /\n/ "\n" ]
let empty = [ label "#empty" . eol ]
asm("mrs %0, MIDR_EL1" : "=r" (cpuid));
VIR_DEBUG("CPUID read from register: 0x%016lx", cpuid);
- /* parse the coresponding part_id bits */
+ /* parse the corresponding part_id bits */
data->pvr = (cpuid >> 4) & 0xfff;
- /* parse the coresponding vendor_id bits */
+ /* parse the corresponding vendor_id bits */
data->vendor_id = (cpuid >> 24) & 0xff;
hwcaps = getauxval(AT_HWCAP);
if (STREQ(directoryName, directoryAndFileName)) {
/*
- * The <path> part of the datatore path didn't contain a '/', assume
+ * The <path> part of the datastore path didn't contain a '/', assume
* that the <path> part is actually the file name.
*/
datastorePathWithoutFileName = g_strdup_printf("[%s]", datastoreName);
/* bonding/mode is in the format: "balance-rr 0" so we find the
* space and increment the pointer to get the number and convert
- * it to an interger. libvirt uses 1 through 7 while the raw
+ * it to an integer. libvirt uses 1 through 7 while the raw
* number is 0 through 6 so increment it by 1.
*/
tmp_str = udev_device_get_sysattr_value(dev, "bonding/mode");
/* bonding/arp_validate is in the format: "none 0" so we find the
* space and increment the pointer to get the number and convert
- * it to an interger.
+ * it to an integer.
*/
tmp_str = udev_device_get_sysattr_value(dev, "bonding/arp_validate");
if (!tmp_str) {
#endif
/* Ideally callers would use the g_*printf
- * functions directly but there are alot to
+ * functions directly but there are a lot to
* convert, so until then...
*/
#ifndef VIR_NO_GLIB_STDIO
* @bandwidth: specify bandwidth limit; flags determine the unit
* @flags: bitwise-OR of virDomainBlockJobSetSpeedFlags
*
- * Set the maximimum allowable bandwidth that a block job may consume. If
+ * Set the maximum allowable bandwidth that a block job may consume. If
* bandwidth is 0, the limit will revert to the hypervisor default of
* unlimited.
*
* virNodeDeviceDettach:
* @dev: pointer to the node device
*
- * Dettach the node device from the node itself so that it may be
+ * Detach the node device from the node itself so that it may be
* assigned to a guest domain.
*
* Depending on the hypervisor, this may involve operations such
}
/*
- * dom0's maximum memory can be controled by the user with the 'dom0_mem' Xen
+ * dom0's maximum memory can be controlled by the user with the 'dom0_mem' Xen
* command line parameter. E.g. to set dom0's initial memory to 4G and max
* memory to 8G: dom0_mem=4G,max:8G
* Supported unit suffixes are [bBkKmMgGtT]. If not specified the default
goto endjob;
}
virDomainObjSetState(vm, VIR_DOMAIN_RUNNING, VIR_DOMAIN_RUNNING_WAKEUP);
- /* reenable death event - libxl reports it only once */
+ /* re-enable death event - libxl reports it only once */
if (priv->deathW)
libxl_evdisable_domain_death(cfg->ctx, priv->deathW);
if (libxl_evenable_domain_death(cfg->ctx, vm->def->id, 0, &priv->deathW))
let int_entry (kw:string) = [ key kw . value_sep . int_val ]
- (* Each enty in the config is one of the following three ... *)
+ (* Each entry in the config is one of the following three ... *)
let entry = bool_entry "auto_disk_leases"
| bool_entry "require_lease_for_disks"
| str_entry "file_lockspace_dir"
let int_entry (kw:string) = [ key kw . value_sep . int_val ]
- (* Each enty in the config is one of the following three ... *)
+ (* Each entry in the config is one of the following three ... *)
let entry = str_entry "disk_lease_dir"
| bool_entry "auto_disk_leases"
| int_entry "host_id"
| int_entry "max_clients"
| int_entry "admin_max_clients"
- (* Each enty in the config is one of the following three ... *)
+ (* Each entry in the config is one of the following three ... *)
let entry = logging_entry
let comment = [ label "#comment" . del /#[ \t]*/ "# " . store /([^ \t\n][^\n]*)?/ . del /\n/ "\n" ]
let empty = [ label "#empty" . eol ]
| int_entry "max_size"
| int_entry "max_backups"
- (* Each enty in the config is one of the following three ... *)
+ (* Each entry in the config is one of the following three ... *)
let entry = logging_entry
let comment = [ label "#comment" . del /#[ \t]*/ "# " . store /([^ \t\n][^\n]*)?/ . del /\n/ "\n" ]
let empty = [ label "#empty" . eol ]
| bool_entry "security_default_confined"
| bool_entry "security_require_confined"
- (* Each enty in the config is one of the following three ... *)
+ (* Each entry in the config is one of the following three ... *)
let entry = log_entry
let comment = [ label "#comment" . del /#[ \t]*/ "# " . store /([^ \t\n][^\n]*)?/ . del /\n/ "\n" ]
let empty = [ label "#empty" . eol ]
if (ndata > 0)
return networks->parseData[ndata - 1];
- /* Not able to retrive an element */
+ /* Not able to retrieve an element */
return NULL;
}
/* If the LXC domain is suspended we send all processes a SIGKILL
* and thaw them. Upon wakeup the process sees the pending signal
* and dies immediately. It is guaranteed that priv->cgroup != NULL
- * here because the domain has aleady been suspended using the
+ * here because the domain has already been suspended using the
* freezer cgroup.
*/
if (reason == VIR_DOMAIN_SHUTOFF_DESTROYED &&
for (i = 0; i < G_N_ELEMENTS(subsystem_ignored); i++) {
const char *s = subsystem_ignored[i];
if (udev_enumerate_add_nomatch_subsystem(udev_enumerate, s) < 0) {
- virReportSystemError(errno, "%s", _("failed to add susbsystem filter"));
+ virReportSystemError(errno, "%s", _("failed to add subsystem filter"));
return -1;
}
}
bool finished;
/* true for sync command */
bool sync;
- /* id of the issued sync comand */
+ /* id of the issued sync command */
unsigned long long id;
bool first;
};
/* try cancelling invalid jobs - this works only if the job is not
* concluded. In such case it will fail. We'll leave such job linger
* in qemu and just forget about it in libvirt because there's not much
- * we coud do besides killing the VM */
+ * we could do besides killing the VM */
if (job->invalidData) {
qemuBlockJobMarkBroken(job);
typedef virQEMUCapsHostCPUData *virQEMUCapsHostCPUDataPtr;
struct _virQEMUCapsHostCPUData {
/* Only the "info" part is stored in the capabilities cache, the rest is
- * re-computed from other fields and external data sources everytime we
+ * re-computed from other fields and external data sources every time we
* probe QEMU or load the cache.
*/
qemuMonitorCPUModelInfoPtr info;
virQEMUCapsInitQMPBasicArch(qemuCaps);
- /* initiate all capapbilities based on qemu version */
+ /* initiate all capabilities based on qemu version */
virQEMUCapsInitQMPVersionCaps(qemuCaps);
if (virQEMUCapsProbeQMPCommands(qemuCaps, mon) < 0)
/* qemuBuildTLSx509BackendProps:
* @tlspath: path to the TLS credentials
- * @listen: boolen listen for client or server setting
+ * @listen: boolean listen for client or server setting
* @verifypeer: boolean to enable peer verification (form of authorization)
* @alias: alias for the TLS credentials object
* @secalias: if one exists, the alias of the security object for passwordid
/* qemuBuildTLSx509CommandLine:
* @cmd: Pointer to command
* @tlspath: path to the TLS credentials
- * @listen: boolen listen for client or server setting
+ * @listen: boolean listen for client or server setting
* @verifypeer: boolean to enable peer verification (form of authorization)
* @certEncSecretAlias: alias of a 'secret' object for decrypting TLS private key
* (optional)
if (!(entry = virHashLookup(driver->sharedDevices, key)))
return -1;
- /* Nothing to do if the shared disk is not recored in the table. */
+ /* Nothing to do if the shared disk is not recorded in the table. */
if (!qemuSharedDeviceEntryDomainExists(entry, name, &idx))
return 0;
if (cont->model == VIR_DOMAIN_CONTROLLER_MODEL_USB_DEFAULT && qemuCaps) {
/* Pick a suitable default model for the USB controller if none
* has been selected by the user and we have the qemuCaps for
- * figuring out which contollers are supported.
+ * figuring out which controllers are supported.
*
* We rely on device availability instead of setting the model
* unconditionally because, for some machine types, there's a
* @mem: memory device definition object
*
* Aligns the size of the memory module as qemu enforces it. The size is updated
- * inplace. Default rounding is now to 1 MiB (qemu requires rouding to page,
+ * inplace. Default rounding is now to 1 MiB (qemu requires rounding to page,
* size so this should be safe).
*/
int
if (vm->def->virtType == VIR_DOMAIN_VIRT_QEMU)
return 0;
- /* The halted state is interresting only on s390(x). On other platforms
+ /* The halted state is interesting only on s390(x). On other platforms
* the data would be stale at the time when it would be used.
* Calling qemuMonitorGetCpuHalted() can adversely affect the running
* VM's performance unless QEMU supports query-cpus-fast.
*
* Validate whether the disk source is valid for disk device='lun'.
*
- * Returns 0 if the configuration is valid -1 and a libvirt error if the soure
+ * Returns 0 if the configuration is valid -1 and a libvirt error if the source
* is invalid.
*/
int
* never need any additional child buses (probably only a few of the
* 32 will ever be used). So for pci-expander-bus we find the lowest
* existing busNr, and set this one to the current lowest - 2 (one
- * for the pxb, one for the intergrated pci-bridge), thus leaving the
+ * for the pxb, one for the integrated pci-bridge), thus leaving the
* maximum possible bus numbers available for other buses plugged
* into pci-root (i.e. pci-bridges and other
* pci-expander-buses). Anyone who needs more than 32 devices
*
* Alter the specified @iothread_id with the values provided.
*
- * Returs 0 on success, -1 on failure
+ * Returns 0 on success, -1 on failure
*/
static int
qemuDomainSetIOThreadParams(virDomainPtr dom,
}
if (header->version > QEMU_SAVE_VERSION) {
- /* convert endianess and try again */
+ /* convert endianness and try again */
bswap_header(header);
}
#define CHANGE_MEDIA_TIMEOUT 5000
-/* Timeout in miliseconds for device removal. PPC64 domains
+/* Timeout in milliseconds for device removal. PPC64 domains
* can experience a bigger delay in unplug operations during
* heavy guest activity (vcpu being the most notable case), thus
* the timeout for PPC64 is also bigger. */
virErrorRestore(&err);
error:
- /* Let the source qemu know that the transfer cant continue anymore.
+ /* Let the source qemu know that the transfer can't continue anymore.
* Don't copy the error for EPIPE as destination has the actual error. */
VIR_FORCE_CLOSE(data->sock);
if (!virLastErrorIsSystemErrno(EPIPE))
* @jobname: name of the job
* @props: JSON object describing the blockdev to add
*
- * Instructs qemu to create/format a new stroage or format layer. Note that
+ * Instructs qemu to create/format a new storage or format layer. Note that
* the job does not add the created/formatted image into qemu and
* qemuMonitorBlockdevAdd needs to be called separately with corresponding
* arguments. Note that the arguments for creating and adding are different.
* '*subattribute': same as above but the selected member must be optional
* (has a property named 'default' in the schema)
* '+variant": In the case of unionized objects, select a specific variant of
- * the prevously selected member
+ * the previously selected member
*
* - Boolean queries - @entry remains NULL, return value indicates success:
* '^enumval': returns true if the previously selected enum contains 'enumval'
* '!basictype': returns true if previously selected type is of 'basictype'
- * JSON type. Spported are 'null', 'string', 'number', 'value',
+ * JSON type. Supported are 'null', 'string', 'number', 'value',
* 'int' and 'boolean.
* '$feature': returns true if the previously selected type supports 'feature'
* ('feature' is in the 'features' array of given type)
* @existstatus: pointer to int returning exit status of process
* @cmdret: pointer to int returning result of virCommandRun
*
- * Start the vhost-user-gpu process with approriate labels.
+ * Start the vhost-user-gpu process with appropriate labels.
* This function returns -1 on security setup error, 0 if all the
* setup was done properly. In case the virCommand failed to run
* 0 is returned but cmdret is set appropriately with the process
| str_entry "host_uuid_source"
| int_entry "ovs_timeout"
- (* Each enty in the config is one of the following three ... *)
+ (* Each entry in the config is one of the following three ... *)
let entry = sock_acl_entry
| authentication_entry
@CUT_ENABLE_IP@
* stateless ones inside libvirt.so). All the interesting
* drivers are in separate daemons. Thus when we get a NULL
* URI we need to simulate probing that virConnectOpen would
- * previously do. We use the existance of the UNIX domain
+ * previously do. We use the existence of the UNIX domain
* socket as our hook for probing.
*
* This assumes no stale sockets left over from a now dead
VIR_DEBUG("sess=%p", sess);
if (priv->password) {
- /* tunelled password authentication */
+ /* tunnelled password authentication */
if ((rc = ssh_userauth_password(sess->session, NULL,
priv->password)) == 0)
return SSH_AUTH_SUCCESS;
sess->hostname)))
return SSH_AUTH_ERROR;
- /* tunelled password authentication */
+ /* tunnelled password authentication */
if ((rc = ssh_userauth_password(sess->session, NULL,
password)) == 0)
return SSH_AUTH_SUCCESS;
*
* This method is used to dispatch a message representing an
* incoming method call from a client. It decodes the payload
- * to obtain method call arguments, invokves the method and
+ * to obtain method call arguments, invokes the method and
* then sends a reply packet with the return values
*
* Returns 0 if the reply was sent, or -1 upon fatal error
VIR_DEBUG("sess=%p", sess);
if (priv->password) {
- /* tunelled password authentication */
+ /* tunnelled password authentication */
if ((rc = libssh2_userauth_password(sess->session,
priv->username,
priv->password)) == 0) {
sess->hostname)))
goto cleanup;
- /* tunelled password authentication */
+ /* tunnelled password authentication */
if ((rc = libssh2_userauth_password(sess->session,
priv->username,
password)) == 0) {
virCheckFlags(VIR_STORAGE_VOL_UPLOAD_SPARSE_STREAM, -1);
/* if volume has target format VIR_STORAGE_FILE_PLOOP
* we need to restore DiskDescriptor.xml, according to
- * new contents of volume. This operation will be perfomed
+ * new contents of volume. This operation will be performed
* when volUpload is fully finished. */
if (vol->target.format == VIR_STORAGE_FILE_PLOOP) {
/* Fail if the volume contains snapshots or we failed to check it.*/
* however, the blkid_do_probe for "dvh" returns "sgi" and
* for "pc98" it returns "dos". Although "bsd" is recognized,
* it seems that the parted created partition table is not being
- * properly recogized. Since each of these will cause problems
+ * properly recognized. Since each of these will cause problems
* with startup comparison, let's just treat them as UNKNOWN causing
* the caller to fallback to using PARTED */
if (STREQ(format, "dvh") || STREQ(format, "pc98") || STREQ(format, "bsd"))
* VIR_BUFFER_INIT_CHILD:
* @parentbuf: parent buffer for XML element formatting
*
- * Intitialize a virBuffer structure and set up the indentation level for
+ * Initialize a virBuffer structure and set up the indentation level for
* formatting XML subelements of @parentbuf.
*/
#define VIR_BUFFER_INIT_CHILD(parentbuf) { NULL, (parentbuf)->indent + 2 }
* @name: the name to look up in current environment
*
* Pass an environment variable to the child
- * using current process' value
+ * using current process's value
*/
void
virCommandAddEnvPass(virCommandPtr cmd, const char *name)
*
* Turns a vector of dnsmasqDhcpHost into the string that is ought to be
* stored in the hostsfile, this functionality is split to make hostsfiles
- * testable. Returs NULL if nhosts is 0.
+ * testable. Returns NULL if nhosts is 0.
*/
char *
dnsmasqDhcpHostsToString(dnsmasqDhcpHost *hosts,
* subcore will vary accordingly to 8, 4 and 2 respectively.
* So, On host threads_per_core what is arrived at from sysfs in the
* current logic is actually the subcores_per_core. Threads per subcore
- * can only be obtained from the kvm device. For example, on P8 wih 1
+ * can only be obtained from the kvm device. For example, on P8 with 1
* core having 8 threads, sub_cores_percore=4, the threads 0,2,4 & 6
* will be online. The sysfs reflects this and in the current logic
* variable 'threads' will be 4 which is nothing but subcores_per_core.
*
* https://www.kernel.org/doc/html/latest/admin-guide/sysfs-rules.html
*
- * Returns true if devpath's susbsystem is pci, false otherwise.
+ * Returns true if devpath's subsystem is pci, false otherwise.
*/
static bool
virNetDevIsPCIDevice(const char *devpath)
VIR_LOG_INIT("util.netdevopenvswitch");
/*
- * Set openvswitch default timout
+ * Set openvswitch default timeout
*/
static unsigned int virNetDevOpenvswitchTimeout = VIR_NETDEV_OVS_DEFAULT_TIMEOUT;
* @path: the path of the unix socket
* @ifname: the retrieved name of the interface
*
- * Retreives the ovs ifname from vhostuser unix socket path.
+ * Retrieves the ovs ifname from vhostuser unix socket path.
*
* Returns: 1 if interface is an openvswitch interface,
* 0 if it is not, but no other error occurred,
* the bridge, or if it is smaller than the current MTU of the
* bridge). If MTU isn't specified for the new device (i.e. 0),
* we need to set the interface MTU to the current MTU of the
- * bridge (to avoid inadvertantly changing the bridge's MTU).
+ * bridge (to avoid inadvertently changing the bridge's MTU).
*/
if (mtu > 0) {
if (virNetDevSetMTU(tapname, mtu) < 0)
/**
- * This array convertor is for quirky cases where the QMP schema mandates an
+ * This array converter is for quirky cases where the QMP schema mandates an
* array of objects with only one attribute 'str' which needs to be formatted as
* repeated key-value pairs without the 'str' being printed:
*
*
* MB:0=100;1=100
*
- * which indicates node id 0 has 100 percent bandwith and node id 1
+ * which indicates node id 0 has 100 percent bandwidth and node id 1
* has 100 percent bandwidth. A trailing semi-colon is not formatted.
*/
static int
/* If OEM String contains newline, dmidecode escapes it as a dot.
* If this is the case then run dmidecode again to get raw string.
- * Unfortunately, we can't dinstinguish betwen dot an new line at
+ * Unfortunately, we can't dinstinguish between dot an new line at
* this level. */
if (memchr(cur, '.', eol - cur)) {
char *str;
*
* Acquire an object for handling systemd activation.
* If no activation FDs have been provided the returned object
- * will be NULL, indicating normal sevice setup can be performed
+ * will be NULL, indicating normal service setup can be performed
* If the returned object is non-NULL then at least one file
* descriptor will be present. No normal service setup should
* be performed.
/*
* executables for the swtpm; to be found on the host along with
- * capabilties bitmap
+ * capabilities bitmap
*/
static virMutex swtpm_tools_lock = VIR_MUTEX_INITIALIZER;
static char *swtpm_path;
* vbox_CAPI_v*.h, or it would cause multiple
* definitions.
*
- * You can see the more informations in vbox_api.h
+ * You can see the more information in vbox_api.h
*/
/* Copied definitions from vbox_CAPI_*.h.
VBOX_UTF8_TO_UTF16(networkNameUtf8, &networkNameUtf16);
/* Currently support only one dhcp server per network
- * with contigious address space from start to end
+ * with contiguous address space from start to end
*/
addr = ipdef->ranges[0].addr;
if ((ipdef->nranges >= 1) &&
gVBoxAPI.UIDHCPServer.GetLowerIP(dhcpServer, &fromIPAddressUtf16);
gVBoxAPI.UIDHCPServer.GetUpperIP(dhcpServer, &toIPAddressUtf16);
/* Currently virtualbox supports only one dhcp server per network
- * with contigious address space from start to end
+ * with contiguous address space from start to end
*/
addr = ipdef->ranges[0].addr;
if (vboxSocketParseAddrUtf16(data, ipAddressUtf16,
if (snapshot->nchildren > 0) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("This snapshot has children, "
- "please delete theses snapshots before"));
+ "please delete these snapshots before"));
return -1;
}
return hardDisk->uuid;
}
-/*Retreive the whole ancestry of the vboxSnapshotXmlHardDiskPtr whose location is
+/*Retrieve the whole ancestry of the vboxSnapshotXmlHardDiskPtr whose location is
*'location', and store them in a newly allocated list of vboxSnapshotXmlHardDiskPtr.
*This list begins with the requested disk, and ends with the farthest ancestor.
*return array length on success, -1 on failure.*/
char *portUtf8 = NULL;
/* get active (effective) port - available only when VM is running and has
- * the VBOX extensions installed (without extenstions RDP server
+ * the VBOX extensions installed (without extensions RDP server
* functionality is disabled)
*/
port = vboxGetActiveVRDEServerPort(data->vboxSession, machine);
*controller = idx / 15;
*unit = idx % 15;
- /* Skip the controller ifself at unit 7 */
+ /* Skip the controller itself at unit 7 */
if (*unit >= 7)
++(*unit);
if (vzEnsureDomainExists(dom) < 0)
goto cleanup;
- /* snaphot name is ignored, it will be set to auto generated by sdk uuid */
+ /* snapshot name is ignored, it will be set to auto generated by sdk uuid */
if (prlsdkCreateSnapshot(dom, def->parent.description) < 0)
goto cleanup;
int *lvEventTypeDetails)
{
/* We skip all intermediate states here, because
- * libvirt doesn't have correspoding event types for
+ * libvirt doesn't have corresponding event types for
* them */
switch ((int)domainState) {
case VMS_STOPPED:
/*
* Though we don't support NUMA configuration at the moment
* virDomainDefPtr always contain non zero NUMA configuration
- * So, just make sure this configuration does't differ from auto generated.
+ * So, just make sure this configuration doesn't differ from auto generated.
*/
if ((virDomainNumatuneGetMode(def->numa, -1, &memMode) == 0 &&
memMode == VIR_DOMAIN_NUMATUNE_MEM_STRICT) ||