blob: 49c2fec851fdaa25b026be58dfd94605b3093456 [file] [log] [blame]
Joseph Myersf7a9f782016-01-04 16:05:181/* Copyright (C) 1991-2016 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
Joseph Myers9d463702015-10-16 20:21:4927chflags (const char *file, unsigned long int flags)
Roland McGrath28f540f1995-02-18 01:27:1028{
Ulrich Drepperb6ab06c2005-12-14 08:43:2529 if (file == NULL)
30 {
31 __set_errno (EINVAL);
32 return -1;
33 }
Roland McGrath28f540f1995-02-18 01:27:1034
Ulrich Drepperc4029821996-09-27 03:45:2435 __set_errno (ENOSYS);
Ulrich Drepperb6ab06c2005-12-14 08:43:2536 return -1;
Roland McGrath28f540f1995-02-18 01:27:1037}
38
Ulrich Drepperb6ab06c2005-12-14 08:43:2539stub_warning (chflags)