From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-x42e.google.com (mail-wr1-x42e.google.com [IPv6:2a00:1450:4864:20::42e]) by sourceware.org (Postfix) with UTF8SMTPS id 988E83858D29 for ; Sat, 26 Dec 2020 19:30:48 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 988E83858D29 Received: by mail-wr1-x42e.google.com with SMTP id q18so6826357wrn.1 for ; Sat, 26 Dec 2020 11:30:48 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=lL1YI/9kFxNsyjz0017EUuPvuXe0LI5gJAt6PtiiyZE=; b=OSj+erTmxggb3+BXvcz1/CEyhk0RKRmmNiMihZQPaVqs6YTeeh38BfHVn5obeB+gA7 GOXHISUkx4sWbBQEYfI9YR4WUs8S5Yn9WDZU5+VxlFk4wwY29lw3aW1BC6lUQj9xEH/K RVdtLXL+A3cVOZBL/Bs1hFrDxR0k3acWQ+SrDj9BiRiOFruQIqOkCiizmIqRB3KwG/vD 6A8/H2vLp7jRICzzn7pMBOqr4+ujS9m3e8VPJhaooG9Cp2oclh6iRvIe96uRv8Bm/Xgw rORyH6/W8EdRO0tYi/cuYBxdhHcyhhzatCWTb5TagNUDR9XiGoQ0pCQTDyAdp/w/CNfi R2SQ== X-Gm-Message-State: AOAM533pwyrwj8VucgTNczmkUzph3VElc5B340DibRdR5dxFWLfUF0H5 Nlt+TW8wpReRZQQandB74sh6iUz2H4o= X-Google-Smtp-Source: ABdhPJyovcBQ5ayRKwpOEjXYD9JjJg/d2AxbnWIA+Ly9coGzBm1ZWpD9/pAHPrfElWgAp/FS0QJvMA== X-Received: by 2002:adf:db43:: with SMTP id f3mr45216773wrj.70.1609011047725; Sat, 26 Dec 2020 11:30:47 -0800 (PST) Received: from localhost.localdomain (ip-244-183.pel.cz. [213.226.244.183]) by smtp.gmail.com with ESMTPSA id c7sm54881939wro.16.2020.12.26.11.30.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 26 Dec 2020 11:30:46 -0800 (PST) From: =?UTF-8?Q?Alexandra_H=C3=A1jkov=C3=A1?= X-Google-Original-From: Alexandra Hájková ahajkova@redhat.com To: libc-alpha@sourceware.org Cc: =?UTF-8?q?Alexandra=20H=C3=A1jkov=C3=A1?= Subject: [PATCH] Add xchdir to libsupport. Date: Sat, 26 Dec 2020 20:30:38 +0100 Message-Id: <20201226193038.988108-1-ahajkova@redhat.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201226174936.985576-1-ahajkova@redhat.com> References: <20201226174936.985576-1-ahajkova@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-14.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) 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-List-Received-Date: Sat, 26 Dec 2020 19:30:49 -0000 From: Alexandra Hájková --- Fix typo in a func name. support/xchdir.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 support/xchdir.c diff --git a/support/xchdir.c b/support/xchdir.c new file mode 100644 index 0000000000..2f10b1a22c --- /dev/null +++ b/support/xchdir.c @@ -0,0 +1,27 @@ +/* chdir with error checking. + Copyright (C) 2020 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#include +#include + +void +xchdir(const char *path) +{ + if (chdir(path) != 0) + FAIL_EXIT1 ("chdir (\"%s\"): %m", path); +} -- 2.26.2