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=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 75E2FC433B4 for ; Fri, 30 Apr 2021 11:41:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 535AE613CD for ; Fri, 30 Apr 2021 11:41:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229981AbhD3Lmq (ORCPT ); Fri, 30 Apr 2021 07:42:46 -0400 Received: from mga07.intel.com ([134.134.136.100]:31963 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229875AbhD3Lmp (ORCPT ); Fri, 30 Apr 2021 07:42:45 -0400 IronPort-SDR: 7mS4ACEa1gs4Wd0pqunRGk+iDI+qZJG4l5WjS0fSGqgxSwEuUZgpxK5Rg0PRX074cDv+fr3qxG y5vuLlTfArSA== X-IronPort-AV: E=McAfee;i="6200,9189,9969"; a="261203264" X-IronPort-AV: E=Sophos;i="5.82,262,1613462400"; d="scan'208";a="261203264" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Apr 2021 04:41:56 -0700 IronPort-SDR: SklqaXO4qHXyNK7OS66vpOzZsMO4cllONuXfDI1piJ6BYCfarsWlRk4W/Ai5I1bBN74T8PBzfr e8ikdvNSUIVw== X-IronPort-AV: E=Sophos;i="5.82,262,1613462400"; d="scan'208";a="424961633" Received: from smile.fi.intel.com (HELO smile) ([10.237.68.40]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Apr 2021 04:41:54 -0700 Received: from andy by smile with local (Exim 4.94) (envelope-from ) id 1lcRWq-008P3B-51; Fri, 30 Apr 2021 14:41:52 +0300 Date: Fri, 30 Apr 2021 14:41:52 +0300 From: Andy Shevchenko To: Bartosz Golaszewski Cc: Kent Gibson , Linus Walleij , "open list:GPIO SUBSYSTEM" Subject: Re: [libgpiod][PATCH 2/3] libgpiosim: new library for controlling the gpio-sim module Message-ID: References: <20210429094734.9585-1-brgl@bgdev.pl> <20210429094734.9585-3-brgl@bgdev.pl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org On Fri, Apr 30, 2021 at 11:29:59AM +0200, Bartosz Golaszewski wrote: > On Thu, Apr 29, 2021 at 7:04 PM Andy Shevchenko > wrote: > > > > On Thu, Apr 29, 2021 at 08:03:01PM +0300, Andy Shevchenko wrote: > > > On Thu, Apr 29, 2021 at 08:00:14PM +0300, Andy Shevchenko wrote: > > > > On Thu, Apr 29, 2021 at 03:07:49PM +0200, Bartosz Golaszewski wrote: > > > > ... > > > > > > Still you may advance the pointer by the length of P_tmpdir + 1. > > > > > > There is also tempnam(). > > > > Scratch it. It seems legacy one that actually tries to create file... > > And also this: > > libgpiod/tests/gpiosim/gpiosim.c:331: warning: the use of `tmpnam_r' > is dangerous, better use `mkstemp' > > So I'll go with my solution. My gosh, we so much legacy stuff here and there... -- With Best Regards, Andy Shevchenko