Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 77C84C2BB85 for ; Thu, 16 Apr 2020 11:00:52 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 04CD921973 for ; Thu, 16 Apr 2020 11:00:51 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="RgbABFpE" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 04CD921973 Authentication-Results: mail.kernel.org; dmarc=pass (p=none dis=none) header.from=alsa-project.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 5946A851; Thu, 16 Apr 2020 13:00:00 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 5946A851 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1587034850; bh=7s9F/XNsbGsOimewojKrYJ1aFHWQOlL+e7GqYuLDXhE=; h=From:To:In-Reply-To:References:Subject:Date:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=RgbABFpEwnOLNSVOAL3brgMu5ulpIJb6HQAOhL2VnYzz/eoAfEGW4n4NoViiBnojN ArlzdxpwI+uXLWtNOUQY1JTJvjKdEkZRaZ5sEkejnzmd7q/Ef3THFkzMDMvIo7VKEY FQvSMKQTG3G5gvb+xGqdqAofLxiBNK051Nc5Q3/k= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 9192EF8012E; Thu, 16 Apr 2020 12:59:59 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 88DD6F8014E; Thu, 16 Apr 2020 12:59:57 +0200 (CEST) Received: from webhooks-bot.alsa-project.org (gate.perex.cz [77.48.224.242]) by alsa1.perex.cz (Postfix) with ESMTP id 0E708F8012E for ; Thu, 16 Apr 2020 12:59:54 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 0E708F8012E MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit From: GitHub pull_request - opened To: alsa-devel@alsa-project.org In-Reply-To: <1587034793425049067-webhooks-bot@alsa-project.org> References: <1587034793425049067-webhooks-bot@alsa-project.org> Subject: alsactl: Wrong line if (!sched_setscheduler(0, SCHED_IDLE, &sched_param)) Message-Id: <20200416105957.88DD6F8014E@alsa1.perex.cz> Date: Thu, 16 Apr 2020 12:59:57 +0200 (CEST) X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" alsa-project/alsa-utils pull request #38 was opened from Oscar65: As man page says: "If successful, the sched_setparam() function shall return zero." So the if must be without ! Without update I got this output in the syslog (journalctl): abr 16 09:25:30 mypc alsactl[1652]: alsactl 1.2.2 daemon started abr 16 09:25:30 mypc alsactl[1652]: /usr/bin/alsactl: do_nice:165sched_setparam failed: No such file or directory That I think that is a wrong message. The call to sched_setparam is correct. This is the output with strace: getpriority(PRIO_PROCESS, 0) = 20 setpriority(PRIO_PROCESS, 0, 19) = 0 getpriority(PRIO_PROCESS, 0) = 1 sched_getparam(0, [0]) = 0 sched_setscheduler(0, SCHED_IDLE, [0]) = 0 write(2, "/usr/bin/alsactl: do_nice:165: ", 31/usr/bin/alsactl: do_nice:165: ) = 31 write(2, "sched_setparam failed: No such f"..., 48sched_setparam failed: No such file or directory) = 48 write(2, "\n", 1) = 1 Call to sched_setscheduler returns 0, so it means that the call was successful. Request URL : https://github.com/alsa-project/alsa-utils/pull/38 Patch URL : https://github.com/alsa-project/alsa-utils/pull/38.patch Repository URL: https://github.com/alsa-project/alsa-utils