From patchwork Tue Oct 5 13:56:24 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 45887 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 1F96A3858438 for ; Tue, 5 Oct 2021 13:56:57 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1F96A3858438 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1633442217; bh=tVf9ag3fpFm5OTB+RpvMAjPOTuXS1sp44qJeTElnQVE=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=brvFgtGJV8Tsyc8XyL5XUQ6ye0MnAmcVE6FnhHx0XTt6iSyvpLsio2/Qy+4kxjuvS 9RtV/BIqAUakY4/b0bJm/dvlc/PWC0ZSleq4/HcRjoeo0AHnU6x1FM6XJ7mIN0e6AJ kYcHvhtpnFFh4QBa5vuyyPY4hahG0vpk2rnW9StU= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-vs1-xe33.google.com (mail-vs1-xe33.google.com [IPv6:2607:f8b0:4864:20::e33]) by sourceware.org (Postfix) with ESMTPS id 89CD9385840B for ; Tue, 5 Oct 2021 13:56:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 89CD9385840B Received: by mail-vs1-xe33.google.com with SMTP id l19so23761957vst.7 for ; Tue, 05 Oct 2021 06:56:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=tVf9ag3fpFm5OTB+RpvMAjPOTuXS1sp44qJeTElnQVE=; b=BXhk2/2AgEaHafWzUbzId+puSlMst6Nb3y1ihInKS1EZhsDjL/znBBj9rpgL/OTVdq uGnfPHihyXxvg/i4xOG3GZHlM+CEmQJ66IDxWdv+fjUa9Dvb43En2e0CH85TVEDn/Qbz Xvd7vJZyVwzGgqegwn01fASUAxz6eVJRjXN8K0LjcDWQElhm1JY5IuHcma6i2zrKNczD ZbGmWPcDYSks0P3o3ZmUMtWtNI3mLkXZ69cxetWNNwkx5vxZo9pCd4Y8oHAksLLbVS1D GUozdWpB+z8MVwu7vILZ69XwPwYrogSX/Z7Clz8wrGBFvhxdNhunsgOwlqoRkx7oO2EA 6NMA== X-Gm-Message-State: AOAM530/dwgeHh43ybkoQ64P2Efp/VHSoWRtpvfFKJpb87374KBoJz6P om4PrZOn3G3gFAwTPv6Mc7Mnpgbk5GNfIA== X-Google-Smtp-Source: ABdhPJylvvXBi3TqvhFIcm4ol7SGIrDE2DaJtyAnQa93e3Lnj3GrDZiyw/b3TrCgPIj0G6fO6mwWIw== X-Received: by 2002:a05:6102:222f:: with SMTP id d15mr18256436vsb.16.1633442194950; Tue, 05 Oct 2021 06:56:34 -0700 (PDT) Received: from birita.. ([2804:431:c7cb:807a:9735:fcf:f170:1c20]) by smtp.gmail.com with ESMTPSA id g204sm3204902vkg.1.2021.10.05.06.56.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Oct 2021 06:56:34 -0700 (PDT) To: libc-alpha@sourceware.org Subject: [PATCH 0/7] Use RFC5424 for syslog Date: Tue, 5 Oct 2021 10:56:24 -0300 Message-Id: <20211005135631.3209020-1-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-Spam-Status: No, score=-6.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Adhemerval Zanella via Libc-alpha From: Adhemerval Zanella Netto Reply-To: Adhemerval Zanella Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" This is an update of my previous patchset [1]. The main driver of this change is to move away of using 32-bit timestamps and for syslog() it would require to use an ad-hoc format. Instead, since RFC5424 does define a better way to format the timestamp, it is used instead. Along with the RFC5424 change, the patch simplifies the code to use a static buffer on default case (so no dynamic allocation for messages up to 1024) and add a proper syslog() testscase. [1] https://sourceware.org/pipermail/libc-alpha/2021-April/124957.html Adhemerval Zanella (7): support: Add xmkfifo misc: Add syslog test misc: syslog: Fix indentation and style misc: syslog: Simplify implementation misc: syslog: Use static buffer misc: syslog: Move SYSLOG_NAME to USE_MISC (BZ #16355) misc: syslog: Use RFC5424 misc/Makefile | 2 + misc/sys/syslog.h | 4 +- misc/syslog.c | 494 +++++++++++++++++++++++----------------------- misc/tst-syslog.c | 475 ++++++++++++++++++++++++++++++++++++++++++++ support/Makefile | 1 + support/xmkfifo.c | 29 +++ support/xunistd.h | 1 + 7 files changed, 758 insertions(+), 248 deletions(-) create mode 100644 misc/tst-syslog.c create mode 100644 support/xmkfifo.c