From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 2DE62A0543; Tue, 21 Jun 2022 11:05:38 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D5A314069C; Tue, 21 Jun 2022 11:05:37 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id AA11F40151 for ; Tue, 21 Jun 2022 11:05:36 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1655802336; 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: in-reply-to:in-reply-to:references:references; bh=qcbeMbJ5e+V1KcX1BNcyKAvT4wFhfd39yy930S6SkAw=; b=LX8Fyl/e+rg8OfasLC2mSEtgq61Xxg+3RQ5q5H+ZXyqeV3+PFdbIDUCoXLK3a/9AdZ/aeL qGX0WHPaj6pmjHsEPIi72OYzoik8Vn1CxyNhisWQd7yNg0NAt0BHy1V3rN72nsx0S86k/T IXzIobYkdIw4kwqAF48ajQ9fePsgK8c= Received: from mail-lf1-f71.google.com (mail-lf1-f71.google.com [209.85.167.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-425-DyXx-_WXMrCxdj6co9t8TA-1; Tue, 21 Jun 2022 05:05:35 -0400 X-MC-Unique: DyXx-_WXMrCxdj6co9t8TA-1 Received: by mail-lf1-f71.google.com with SMTP id a29-20020a194f5d000000b004790a4ba4bdso6694709lfk.11 for ; Tue, 21 Jun 2022 02:05:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=qcbeMbJ5e+V1KcX1BNcyKAvT4wFhfd39yy930S6SkAw=; b=FT3zVy7ibswBKulQMD4Yz4W1IG+OGYHwWzmxa3Qt7a7Kn1+pponsfia4diSa4fS3TC XQ89aCO08iIaTDsHOhu0Fry/vGdnYRcZZ1Hm+vDm8ie9xsIbqPaRgHc5R198SH70ui1X kYJ/sCdJafmWMEOWsFnYax1+kWdu6hAxWF0H/57krwLGAGUcJ3ZuF2eTMpRgmENKiXeO aDpj9glC56XxpFA/zCl+R2bW4/LHJUcegl0Ld/ay+Lh/cCx9It+17eiVa+BVDh9dV987 7d8zxgun1zn760X7Zt/C2Ve9MGmOHIZCbarYjqnqDnSOZljQiObdbGFtzpYPzZKwY5sc TTsw== X-Gm-Message-State: AJIora93ZNWkjw6KqB1Ce6qhRaaKU/0VriYNUx4Q0fiJuknDAR/ggRgh zMvwW5fjnPrFZQF5CwshuYYSdACgvCA+eKb8nCqvMUjsTgdBnbv/VCE+YK0T6vKDGOMktfwZnqv 6oa2ibyRFDvl3tJTgiHo= X-Received: by 2002:a2e:3613:0:b0:258:e0cc:d83b with SMTP id d19-20020a2e3613000000b00258e0ccd83bmr13604137lja.297.1655802333094; Tue, 21 Jun 2022 02:05:33 -0700 (PDT) X-Google-Smtp-Source: AGRyM1s1Hk8Ju2lX7PYFi3MTnw0Rs/xnpf1Dod+ikInpkPXmuFF1Z76sqqGj2rg1eQV4uwtNS3LEIjSWXxwVvT748kg= X-Received: by 2002:a2e:3613:0:b0:258:e0cc:d83b with SMTP id d19-20020a2e3613000000b00258e0ccd83bmr13604132lja.297.1655802332908; Tue, 21 Jun 2022 02:05:32 -0700 (PDT) MIME-Version: 1.0 References: <20220607120014.49823-1-fengchengwen@huawei.com> <20220617022913.47564-1-fengchengwen@huawei.com> <20220617022913.47564-3-fengchengwen@huawei.com> In-Reply-To: <20220617022913.47564-3-fengchengwen@huawei.com> From: David Marchand Date: Tue, 21 Jun 2022 11:05:21 +0200 Message-ID: Subject: Re: [PATCH v3 2/4] eal: fix errno not set if strftime return zero To: Chengwen Feng Cc: Thomas Monjalon , dev , "Burakov, Anatoly" , Jerin Jacob Kollanukkaran , Bruce Richardson Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dmarchan@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Fri, Jun 17, 2022 at 4:35 AM Chengwen Feng wrote: > > The trace_session_name_generate() takes errno as the return value, but > the errno was not set if strftime return zero, the previously set errno > is returned in this case, this will result in inaccurate prompting. > > This patch sets errno to ENOSPC if strftime return zero to fix it. > > Fixes: 321dd5f8fa62 ("trace: add internal init and fini interface") > Cc: stable@dpdk.org > > Signed-off-by: Chengwen Feng Good catch. With the next fix, the error condition (on trace_dir being too short to accomodate with formatted date) cannot be reached anymore. I squashed those two patches together. I also updated the commitlog to give some details why we were getting a EEXIST (or ENOENT) errno. -- David Marchand