From nobody Tue Feb 10 04:14:08 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1614971730; cv=none; d=zohomail.com; s=zohoarc; b=oLyPGw/xfky1YQLYfpDchE9fw/M5vM7XLkTWBxGnbiY3oOOXRi058JbUAyGPnYL5JHT8rcAB3MmiHv9QKaCTbNKTjNlKCMYHo44Q/gfbJGeG18XZPc1XmDuFm94t6IdRMHqgo/b+MQR/gIl3MF3zomUEEFN/WvQw5i4K3Zovc9s= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1614971730; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=zd146M5IFbtb8G9OHGsTxR/gcj3JwWt4saQb0GsK4Ts=; b=TJ/1TSdSHiYaNK7J+Ktn7vzbRpOlfq4HcEgy5KuaqrD1+HSrrtahI3UzBF4yt0zq8MTyB1HaXvF6JEoJmt7AZ5cM3q2DO0devQQN8ZrBcAiMf7qiXCQ6HIT2sH1RVRw7YH+Hu3hkKuo11DCk099i1a5qrgB78mwImle9hXgTV78= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1614971730639331.6061831908537; Fri, 5 Mar 2021 11:15:30 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-279-H5CiogN4OdSbaNi5CBdhEw-1; Fri, 05 Mar 2021 14:15:27 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B289D1084D79; Fri, 5 Mar 2021 19:15:20 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 855DA6268D; Fri, 5 Mar 2021 19:15:20 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 4F89357DC3; Fri, 5 Mar 2021 19:15:20 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 125JEDkU001711 for ; Fri, 5 Mar 2021 14:14:13 -0500 Received: by smtp.corp.redhat.com (Postfix) id C81875D6DC; Fri, 5 Mar 2021 19:14:13 +0000 (UTC) Received: from harajuku.usersys.redhat.com (unknown [10.40.194.220]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 29B455D6B1 for ; Fri, 5 Mar 2021 19:14:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1614971729; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=zd146M5IFbtb8G9OHGsTxR/gcj3JwWt4saQb0GsK4Ts=; b=XZ56Igtxk3r/3DEkl4GSQAjYdKbNRJAGQw9Pa/juFaisS5rFiD+fY4fgn+ui0qCNW2nZ1W 8prIuHj4yk7dosD9Ri0AOZ4ljZWiZBjmguEi51H3meUVmSrH4wwBukcbKBJXVkv5RdL5UV kkrgcAN25RRr94P1bRYvwD63rUi+2wQ= X-MC-Unique: H5CiogN4OdSbaNi5CBdhEw-1 From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH 02/17] util: Simplify stubs Date: Fri, 5 Mar 2021 20:13:49 +0100 Message-Id: <20210305191404.529903-3-abologna@redhat.com> In-Reply-To: <20210305191404.529903-1-abologna@redhat.com> References: <20210305191404.529903-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Calling a stub should always result in ENOSYS being raised, regardless of what arguments are passed to it. Signed-off-by: Andrea Bolognani --- src/util/virprocess.c | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/src/util/virprocess.c b/src/util/virprocess.c index 9fe75d54d6..e01ff25540 100644 --- a/src/util/virprocess.c +++ b/src/util/virprocess.c @@ -850,11 +850,8 @@ virProcessGetMaxMemLock(pid_t pid, #else /* ! (WITH_GETRLIMIT && defined(RLIMIT_MEMLOCK)) */ int virProcessGetMaxMemLock(pid_t pid G_GNUC_UNUSED, - unsigned long long *bytes) + unsigned long long *bytes G_GNUC_UNUSED) { - if (!bytes) - return 0; - virReportSystemError(ENOSYS, "%s", _("Not supported on this platform")= ); return -1; } @@ -900,11 +897,9 @@ virProcessSetMaxProcesses(pid_t pid, unsigned int proc= s) } #else /* ! (WITH_SETRLIMIT && defined(RLIMIT_NPROC)) */ int -virProcessSetMaxProcesses(pid_t pid G_GNUC_UNUSED, unsigned int procs) +virProcessSetMaxProcesses(pid_t pid G_GNUC_UNUSED, + unsigned int procs G_GNUC_UNUSED) { - if (procs =3D=3D 0) - return 0; - virReportSystemError(ENOSYS, "%s", _("Not supported on this platform")= ); return -1; } @@ -957,11 +952,9 @@ virProcessSetMaxFiles(pid_t pid, unsigned int files) } #else /* ! (WITH_SETRLIMIT && defined(RLIMIT_NOFILE)) */ int -virProcessSetMaxFiles(pid_t pid G_GNUC_UNUSED, unsigned int files) +virProcessSetMaxFiles(pid_t pid G_GNUC_UNUSED, + unsigned int files G_GNUC_UNUSED) { - if (files =3D=3D 0) - return 0; - virReportSystemError(ENOSYS, "%s", _("Not supported on this platform")= ); return -1; } @@ -1004,11 +997,8 @@ virProcessSetMaxCoreSize(pid_t pid, unsigned long lon= g bytes) #else /* ! (WITH_SETRLIMIT && defined(RLIMIT_CORE)) */ int virProcessSetMaxCoreSize(pid_t pid G_GNUC_UNUSED, - unsigned long long bytes) + unsigned long long bytes G_GNUC_UNUSED) { - if (bytes =3D=3D 0) - return 0; - virReportSystemError(ENOSYS, "%s", _("Not supported on this platform")= ); return -1; } --=20 2.26.2