From b98b0a890ea0df495a4fea579d9b0d91348c2ae8 Mon Sep 17 00:00:00 2001 From: Maxime Henrion Date: Sun, 5 May 2002 23:51:32 +0000 Subject: [PATCH] Document the lchflags(2) syscall. --- lib/libc/sys/Makefile.inc | 2 +- lib/libc/sys/chflags.2 | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/lib/libc/sys/Makefile.inc b/lib/libc/sys/Makefile.inc index 238c7e422197..5f78b60e0726 100644 --- a/lib/libc/sys/Makefile.inc +++ b/lib/libc/sys/Makefile.inc @@ -90,7 +90,7 @@ MAN+= sched_get_priority_max.2 sched_setparam.2 \ MLINKS+=access.2 eaccess.2 MLINKS+=brk.2 sbrk.2 MLINKS+=chdir.2 fchdir.2 -MLINKS+=chflags.2 fchflags.2 +MLINKS+=chflags.2 fchflags.2 chflags.2 lchflags.2 MLINKS+=chmod.2 fchmod.2 chmod.2 lchmod.2 MLINKS+=chown.2 fchown.2 chown.2 lchown.2 MLINKS+=clock_gettime.2 clock_getres.2 clock_gettime.2 clock_settime.2 diff --git a/lib/libc/sys/chflags.2 b/lib/libc/sys/chflags.2 index dae7efd45a8d..11cb734de6fb 100644 --- a/lib/libc/sys/chflags.2 +++ b/lib/libc/sys/chflags.2 @@ -37,6 +37,7 @@ .Os .Sh NAME .Nm chflags , +.Nm lchflags , .Nm fchflags .Nd set file flags .Sh LIBRARY @@ -47,6 +48,8 @@ .Ft int .Fn chflags "const char *path" "u_long flags" .Ft int +.Fn lchflags "const char *path" "int flags" +.Ft int .Fn fchflags "int fd" "u_long flags" .Sh DESCRIPTION The file whose name @@ -57,6 +60,16 @@ or referenced by the descriptor has its flags changed to .Fa flags . .Pp +The +.Fn lchflags +system call is like +.Fn chflags +except in the case where the named file is a symbolic link, +in which case +.Fn lchflags +will change the flags of the link itself, +rather than the file it points to. +.Pp The flags specified are formed by .Em or Ns 'ing the following values