From nobody Tue Sep 9 09:57:18 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1746457057; cv=none; d=zohomail.com; s=zohoarc; b=YxMpJMlzbOHroDQWHXn8rpUcRZkmIAnGzovZ8I6jKz2Znt6HPjuCnSy3R3thlRT3Q+9alqjVA/QE4vKus5NmhHXwYWkJjjywFgkwrBcZOaRA3TmgT+qn2BxWF/tyy0ONQjLzETJKbTLY/G2RYohngWmjmvNlEZjKdCXky8GXrC8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1746457057; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id; bh=FDpp0JnNM4DmuH39gTa66YFxffg6gBdhMxAlPgBoS/E=; b=fzgUsf+/4DYZ5gcdX+qFa0QL0sIYWR3m6HXUnn/u/FDlZk28nO6WV5VbvXjrokZvpwVikShshMS7nJvAaan59cP8qXS+sRSMv9HVO5GkQkwk4lD7APsu4zT2GMvnnd1Uf3sa/t5Hiz1jcJpWtLgnsg2WD1bSswWgWIEaXBz1q+4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1746457057285930.5959356418922; Mon, 5 May 2025 07:57:37 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 5467B13F0; Mon, 5 May 2025 10:57:36 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id 0102D1423; Mon, 5 May 2025 10:56:46 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 62A5F13DE; Mon, 5 May 2025 10:56:42 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id B45AE128F for ; Mon, 5 May 2025 10:56:41 -0400 (EDT) Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-523-V2AXLMHZOQOx3J9lVLkzjg-1; Mon, 05 May 2025 10:56:39 -0400 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id D4C20180ACCF for ; Mon, 5 May 2025 14:56:35 +0000 (UTC) Received: from speedmetal.lan (unknown [10.45.242.14]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 3CD1D1800352; Mon, 5 May 2025 14:56:33 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1746457001; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=FevmaNQwN4N4fBj0rVXHy3GlzWG3SBd6aCkB1lMKkh8=; b=Fla0y6zcfaLa9Loz8wdGumJsiyi/b2+Sw4WadJsBEMMGPwlqkMIa58wO0Vqhx2FN9x28MP MnXzvfmeo+vPvdmsX+b/2UlJHnziV9WwSYl5uIMAgXD8asKtXBwMqjieFrZJp1a/xLpNWh XyPJ83zwGZeX0CI9e4K4Lt5plcuPROU= X-MC-Unique: V2AXLMHZOQOx3J9lVLkzjg-1 X-Mimecast-MFC-AGG-ID: V2AXLMHZOQOx3J9lVLkzjg_1746456998 To: devel@lists.libvirt.org Subject: [PATCH 1/2] API: Clarify behaviour of autostart vs autostart once Date: Mon, 5 May 2025 16:56:28 +0200 Message-ID: <8391c25d3bdaab06d34f07d07b669800264fb619.1746456968.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: CpMR3VBHR-NWKbhS6oTwv5ysRbPmv-4RDn2Qx7GLCaE_1746456998 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: YGNM2UQKOLDGIPREHWJB2YSTP6QGTCC2 X-Message-ID-Hash: YGNM2UQKOLDGIPREHWJB2YSTP6QGTCC2 X-MailFrom: pkrempa@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header CC: Peter Krempa X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: From: Peter Krempa via Devel Reply-To: Peter Krempa X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1746457057851116600 Content-Type: text/plain; charset="utf-8" From: Peter Krempa If either of the autostart settings is enabled the VM will be autostarted. Attempt to clarify that. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- src/libvirt-domain.c | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c index f788fa9a58..738a0e9d85 100644 --- a/src/libvirt-domain.c +++ b/src/libvirt-domain.c @@ -7322,9 +7322,8 @@ virDomainCreateWithFiles(virDomainPtr domain, unsigne= d int nfiles, * @domain: a domain object * @autostart: the value returned * - * Provides a boolean value indicating whether the domain - * configured to be automatically started when the host - * machine boots. + * Provides a boolean value indicating whether the domain is configured to= be + * automatically started each time when the host machine boots. * * Returns -1 in case of error, 0 in case of success * @@ -7366,8 +7365,8 @@ virDomainGetAutostart(virDomainPtr domain, * @domain: a domain object * @autostart: whether the domain should be automatically started 0 or 1 * - * Configure the domain to be automatically started - * when the host machine boots. + * Configure the domain to be automatically started eacth time when the ho= st + * machine boots. * * Returns -1 in case of error, 0 in case of success * @@ -7409,9 +7408,12 @@ virDomainSetAutostart(virDomainPtr domain, * @domain: a domain object * @autostart: the value returned * - * Provides a boolean value indicating whether the domain - * is configured to be automatically started the next time - * the host machine boots only. + * Provides a boolean value indicating whether the domain is configured to= be + * automatically started next time when the host machine boots. + * + * Note that autostart configured via the virDomain[Set|Get]AutostartOnce = APIs + * is independent from the autostart configured via virDomain[Set|Get]Auto= start. + * Enabling either of them will cause the VM to be started on the next boo= t. * * Returns -1 in case of error, 0 in case of success * @@ -7453,8 +7455,12 @@ virDomainGetAutostartOnce(virDomainPtr domain, * @domain: a domain object * @autostart: whether the domain should be automatically started 0 or 1 * - * Configure the domain to be automatically started - * the next time the host machine boots only. + * Configure the domain to be automatically started eacth time when the ho= st + * machine boots. + * + * Note that autostart configured via the virDomain[Set|Get]AutostartOnce = APIs + * is independent from the autostart configured via virDomain[Set|Get]Auto= start. + * Enabling either of them will cause the VM to be started on the next boo= t. * * Returns -1 in case of error, 0 in case of success * --=20 2.49.0