From mboxrd@z Thu Jan 1 00:00:00 1970 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=-1.0 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, FORGED_MUA_MOZILLA,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=no 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 6CAD2C4338F for ; Sun, 25 Jul 2021 19:13:53 +0000 (UTC) Received: from shelob.surriel.com (shelob.surriel.com [96.67.55.147]) (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 D8391604DC for ; Sun, 25 Jul 2021 19:13:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org D8391604DC Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kernelnewbies.org Received: from localhost ([::1] helo=shelob.surriel.com) by shelob.surriel.com with esmtp (Exim 4.94.2) (envelope-from ) id 1m7jZ9-0003DE-6C; Sun, 25 Jul 2021 15:13:35 -0400 Received: from ciao.gmane.io ([116.202.254.214]) by shelob.surriel.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1m7jZ7-0003D7-P2 for kernelnewbies@kernelnewbies.org; Sun, 25 Jul 2021 15:13:33 -0400 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1m7jZ5-0001QS-5w for kernelnewbies@kernelnewbies.org; Sun, 25 Jul 2021 21:13:31 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: kernelnewbies@kernelnewbies.org From: Ian Pilcher Subject: Re: Return value for "impossible" situations Date: Sun, 25 Jul 2021 14:13:25 -0500 Message-ID: References: <8d6d8484-0a1e-129b-b6b9-a26980732745@petrovitsch.priv.at> Mime-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 In-Reply-To: <8d6d8484-0a1e-129b-b6b9-a26980732745@petrovitsch.priv.at> Content-Language: en-US X-BeenThere: kernelnewbies@kernelnewbies.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Learn about the Linux kernel List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: kernelnewbies-bounces@kernelnewbies.org On 7/25/21 1:59 PM, Bernd Petrovitsch wrote: > This value goes up to userspace (otherwise it makes no real sense to use > errno-values). Yes. I know that. > That depends on the situation/sys-call/.... > You habe to choose the value (the list and short explanation is in `man > errno`) which leads the userspace application and it's user in the best > direction. Yes. I've already reviewed the manpage and the kernel headers, and I don't see anything that jumps out as appropriate for an unexpected "logic" error. Thus my question about a convention for this sort of situation. > And no, you can't invent new values. I know. -- ======================================================================== In Soviet Russia, Google searches you! ======================================================================== _______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies