blob: 241be86be7e46ac348ba72a23f4ad0cd00fe7506 [file] [log] [blame]
Joseph Myersb1680572015-01-02 16:28:191/* Copyright (C) 1991-2015 Free Software Foundation, Inc.
Ulrich Drepper478b92f1997-06-23 21:55:262 This file is part of the GNU C Library.
Roland McGrath28f540f1995-02-18 01:27:103
Ulrich Drepper478b92f1997-06-23 21:55:264 The GNU C Library is free software; you can redistribute it and/or
Andreas Jaeger41bdb6e2001-07-06 04:58:115 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
Roland McGrath28f540f1995-02-18 01:27:108
Ulrich Drepper478b92f1997-06-23 21:55:269 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Andreas Jaeger41bdb6e2001-07-06 04:58:1112 Lesser General Public License for more details.
Roland McGrath28f540f1995-02-18 01:27:1013
Andreas Jaeger41bdb6e2001-07-06 04:58:1114 You should have received a copy of the GNU Lesser General Public
Paul Eggert59ba27a2012-02-09 23:18:2215 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
Roland McGrath28f540f1995-02-18 01:27:1017
Roland McGrath28f540f1995-02-18 01:27:1018#include <errno.h>
Ulrich Drepperb6ab06c2005-12-14 08:43:2519#include <stddef.h>
20#include <sys/stat.h>
Roland McGrath28f540f1995-02-18 01:27:1021
Ulrich Drepperb6ab06c2005-12-14 08:43:2522/* Change the flags of FILE to FLAGS. */
Roland McGrath28f540f1995-02-18 01:27:1023
Samuel Thibault5d2556c2015-02-07 20:56:1524int chflags (const char *file, unsigned long int flags) __THROW;
Ulrich Drepperb6ab06c2005-12-14 08:43:2525
26int
27chflags (file, flags)
28 const char *file;
Samuel Thibault5d2556c2015-02-07 20:56:1529 unsigned long int flags;
Roland McGrath28f540f1995-02-18 01:27:1030{
Ulrich Drepperb6ab06c2005-12-14 08:43:2531 if (file == NULL)
32 {
33 __set_errno (EINVAL);
34 return -1;
35 }
Roland McGrath28f540f1995-02-18 01:27:1036
Ulrich Drepperc4029821996-09-27 03:45:2437 __set_errno (ENOSYS);
Ulrich Drepperb6ab06c2005-12-14 08:43:2538 return -1;
Roland McGrath28f540f1995-02-18 01:27:1039}
40
Ulrich Drepperb6ab06c2005-12-14 08:43:2541stub_warning (chflags)