Re: CVS commit: src/usr.bin/chflags

2023-05-31 Thread Jan Schaumann
Valery Ushakov  wrote:

> I think that information *must* be there, as that's *the* place where
> the names are (un)parsed.  I'm not sure whether this information has
> to be duplicated as-is in chflags(1), or whether chflags(1) can have a
> less verbose version.

Perhaps a simple

See stat_flags(3) for a more detailed description of
the meaning of these flags.

or something like that?

-Jan


Re: CVS commit: src/usr.bin/chflags

2023-05-31 Thread Valery Ushakov
On Thu, May 25, 2023 at 09:59:41 -0400, Greg Troxel wrote:

> Taylor R Campbell  writes:
> 
> > jschauma@'s change did help clarify (1) and (2).  Let's try to work
> > together to make it better?
[...] 
> I would recommend:
> 
>   Noting that archive flag represents something in some foreign
>   filesystems, currently known to exist only for some MSDOS filesystems,
>   and that the specific filesystem should document that.
> 
>   Explaining that the nodump flag is a request that backup programs omit
>   the file from backups and to see dump(8).
> 
>   Be clearer about permissions.
> 
>   Drop the restatement of tokens into a third only-here namespace.
>   Instead, use paragraphs following to describe that each token means.

I have added slightly more verbose descriptions to stat_flags(3) -
which are the functions in -lutil used by several programs that deal
with flag names and added a xref to it from chflags(1).  That man page
now lists all the alternative flag names too and explicitly mentions
dump/nonodump as negation of nodump.

I think that information *must* be there, as that's *the* place where
the names are (un)parsed.  I'm not sure whether this information has
to be duplicated as-is in chflags(1), or whether chflags(1) can have a
less verbose version.

-uwe


CVS commit: src/usr.bin/chflags

2023-05-31 Thread Valery Ushakov
Module Name:src
Committed By:   uwe
Date:   Wed May 31 20:33:22 UTC 2023

Modified Files:
src/usr.bin/chflags: chflags.1

Log Message:
chflags(1): xref stat_flags(3)


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/usr.bin/chflags/chflags.1

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/chflags/chflags.1
diff -u src/usr.bin/chflags/chflags.1:1.31 src/usr.bin/chflags/chflags.1:1.32
--- src/usr.bin/chflags/chflags.1:1.31	Thu May 25 12:57:37 2023
+++ src/usr.bin/chflags/chflags.1	Wed May 31 20:33:22 2023
@@ -1,4 +1,4 @@
-.\"	$NetBSD: chflags.1,v 1.31 2023/05/25 12:57:37 jschauma Exp $
+.\"	$NetBSD: chflags.1,v 1.32 2023/05/31 20:33:22 uwe Exp $
 .\"
 .\" Copyright (c) 1989, 1990, 1993, 1994
 .\"	The Regents of the University of California.  All rights reserved.
@@ -149,6 +149,7 @@ for details.
 .Xr lchflags 2 ,
 .Xr stat 2 ,
 .Xr fts 3 ,
+.Xr stat_flags 3 ,
 .Xr symlink 7 ,
 .Xr dump 8 ,
 .Xr init 8 ,



CVS commit: src/usr.bin/chflags

2023-05-31 Thread Valery Ushakov
Module Name:src
Committed By:   uwe
Date:   Wed May 31 20:33:22 UTC 2023

Modified Files:
src/usr.bin/chflags: chflags.1

Log Message:
chflags(1): xref stat_flags(3)


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/usr.bin/chflags/chflags.1

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



Re: CVS commit: src/usr.bin/chflags

2023-05-25 Thread Robert Elz
Date:Thu, 25 May 2023 09:59:41 -0400
From:Greg Troxel 
Message-ID:  


  | Also, the man page does not explain that because "nodump" is the name of
  | a flag, one does "chflags dump foo" to remove the nodump flag.

It doesn't really need to, as while that works, so does nonodump, which
is more consistent with the others.

kre



Re: CVS commit: src/usr.bin/chflags

2023-05-25 Thread Greg Troxel
Taylor R Campbell  writes:

> jschauma@'s change did help clarify (1) and (2).  Let's try to work
> together to make it better?

Well said.


I can shed a little light on some of the questions.

> 1. What is `arch' or `archived' supposed to mean?  Who sets it, who
>pays attention to it, and what consequences does it have?  Is it
>obsolete?  What was it used for?  From the current text, I have no
>idea!

>From reading sources, I think it is exactly "the archive bit is set in
the foreign filesystem entry that this vnode is representting" and that
it is basically an MS-DOS thing that is likely not important (even to
people that do not dismiss all things Windows!) any more.

> 2. What is `nodump' supposed to mean?  Who sets it, who pays attention
>to it, and what consequences does it have?  Does the kernel do
>anything about it, or is it just an extra bit of storage that
>programs like dump(8) can choose to examine?  From the current
>text, I have no idea!

I believe it is just a bit that other programs can query, and that the
intent is that dump(8) will decline to dump files with the bit set.

(I intend, in my Copious Spare Time, to extend pkgsrc/sysutils/bup to
respect this flag.  I have previously made extensive use of nodump with
dump.  Partly because of lack of the bit in bup and partly for
organizational sanity, I use /u0 and /n0 for things that should and
should not be backed up.  But that's me in case it helps motivate why
nodump is useful, not about flag docs.)

I believe that nodump continues to be relevant today.

> 3. What is the difference between `system' and `user' immutable or
>append-only?  If I set uchg, does that mean the _owner_ can't
>modify the file, or that _nobody_ can modify the file?

Not useful for a 1 man page, but

  egrep '[SU]F_' /usr/include/sys/stat.h

is illuminating to programmers.

I believe, but would have to read the code to be 100% sure, that

  only root can modify schg and sappnd flags (and archive)

  either root or the owner can modify other flags (except on
  device files, on which only root may modify flags, for reasons that
  are unclear, but the rationale seems unimportant)

  etiher schg or uchg means the file can't be modified, probably, but
  it's possible that uchg applies to everybody but root and schg applies
  to everybody.  A quick experiment shows that root cannot write to a
  gdt-owned file with the uchg bit set.

Fundamentally there are 16 flag bits for user and 16 for system and I
think it is baked in hard that only root can modify the system set.

> jschauma@'s change did help clarify (1) and (2).  Let's try to work
> together to make it better?

The fundamental issue is that the table attempts to

  - map the tokens used by chflags(1) (good)

  - to names that sort of represent the flags (which are fundamentally C
preprocessor token) but are a third namespace that exists only here
(bad)

  - describe the flags permissions as if they are individual, instead of
simly saying that schg and sappend may be changed by superuser
only (confusing)

  - does not give semantics (ok, because that is not consistent with a
table)

Also, the man page does not explain that because "nodump" is the name of
a flag, one does "chflags dump foo" to remove the nodump flag.

(I don't think it needs explanation that the design decision is that
nodump is a flag, instead of dump, because the norms are that files tend
not to have any flags set and that all files should be backed up.)



I would recommend:

  Noting that archive flag represents something in some foreign
  filesystems, currently known to exist only for some MSDOS filesystems,
  and that the specific filesystem should document that.

  Explaining that the nodump flag is a request that backup programs omit
  the file from backups and to see dump(8).

  Be clearer about permissions.

  Drop the restatement of tokens into a third only-here namespace.
  Instead, use paragraphs following to describe that each token means.


Re: CVS commit: src/usr.bin/chflags

2023-05-25 Thread Taylor R Campbell
> Date: Thu, 25 May 2023 15:10:41 +0300
> From: Valery Ushakov 
> 
> This new paragraph is wedged right between the list of the options and
> the continuation of that same paragraph that says that they can be
> prefixed with "no".
> 
> A description of an obsolete flag right in the middle of the manpage
> is a very poor narrative choice.
> 
> Calling nodump "not intuitive" is not intuitive.
> 
> Anyway, this change is strictly for the worse.  If you want to keep
> these random tidbits of information, move them elsewhere, like HISTORY
> section (which is probably the most appropriate place for the
> obsolete, unused, compat-only msdos flag).

Can I suggest framing this a little more constructively and a little
less derisively?

Personally I find the chflags options confusing, and I appreciate
jschauma@ taking the time to sort them out and clarify the
documentation even if it's not perfect the first time around.

Here are some questions that come to mind when I read the man page as
it is:

1. What is `arch' or `archived' supposed to mean?  Who sets it, who
   pays attention to it, and what consequences does it have?  Is it
   obsolete?  What was it used for?  From the current text, I have no
   idea!

2. What is `nodump' supposed to mean?  Who sets it, who pays attention
   to it, and what consequences does it have?  Does the kernel do
   anything about it, or is it just an extra bit of storage that
   programs like dump(8) can choose to examine?  From the current
   text, I have no idea!

3. What is the difference between `system' and `user' immutable or
   append-only?  If I set uchg, does that mean the _owner_ can't
   modify the file, or that _nobody_ can modify the file?

jschauma@'s change did help clarify (1) and (2).  Let's try to work
together to make it better?


Re: CVS commit: src/usr.bin/chflags

2023-05-25 Thread Jan Schaumann
Valery Ushakov  wrote:
> Anyway, this change is strictly for the worse.

¯\_(ツ)_/¯ 

I've reverted the change.

-Jan


CVS commit: src/usr.bin/chflags

2023-05-25 Thread Jan Schaumann
Module Name:src
Committed By:   jschauma
Date:   Thu May 25 12:57:38 UTC 2023

Modified Files:
src/usr.bin/chflags: chflags.1

Log Message:
revert my previous commit as there is no agreement on it being either desired
or appropriate


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/usr.bin/chflags/chflags.1

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/chflags/chflags.1
diff -u src/usr.bin/chflags/chflags.1:1.30 src/usr.bin/chflags/chflags.1:1.31
--- src/usr.bin/chflags/chflags.1:1.30	Thu May 25 01:31:27 2023
+++ src/usr.bin/chflags/chflags.1	Thu May 25 12:57:37 2023
@@ -1,4 +1,4 @@
-.\"	$NetBSD: chflags.1,v 1.30 2023/05/25 01:31:27 uwe Exp $
+.\"	$NetBSD: chflags.1,v 1.31 2023/05/25 12:57:37 jschauma Exp $
 .\"
 .\" Copyright (c) 1989, 1990, 1993, 1994
 .\"	The Regents of the University of California.  All rights reserved.
@@ -32,7 +32,7 @@
 .\"
 .\"	@(#)chflags.1	8.4 (Berkeley) 5/2/95
 .\"
-.Dd May 24, 2023
+.Dd May 25, 2023
 .Dt CHFLAGS 1
 .Os
 .Sh NAME
@@ -104,18 +104,6 @@ The following keywords are currently def
 .It Li uchg Ta user immutable Ta owner or super-user
 .El
 .Pp
-The
-.Cm arch
-flag is only used in connection with certain foreign
-filesystems (e.g., MS-DOS, where it indicates whether
-a file has been modified since it was last backed up).
-.Pp
-A file with the
-.Cm nodump
-flag set will by default only be backed up by
-.Xr dump 8
-during full backups.
-.Pp
 Putting the letters
 .Sq Cm no
 before a keyword causes the flag to be turned off.



CVS commit: src/usr.bin/chflags

2023-05-25 Thread Jan Schaumann
Module Name:src
Committed By:   jschauma
Date:   Thu May 25 12:57:38 UTC 2023

Modified Files:
src/usr.bin/chflags: chflags.1

Log Message:
revert my previous commit as there is no agreement on it being either desired
or appropriate


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/usr.bin/chflags/chflags.1

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



Re: CVS commit: src/usr.bin/chflags

2023-05-25 Thread Greg Troxel
Valery Ushakov  writes:

> On Thu, May 25, 2023 at 07:17:52 -0400, Greg Troxel wrote:
>
>> Jan Schaumann  writes:
>> 
>> > Valery Ushakov  wrote:
>> >> On Wed, May 24, 2023 at 22:33:17 +, Jan Schaumann wrote:
>> >
>> >> > Briefly describe the 'arch' and 'nodump' flags.
>> >> 
>> >> What makes them special and why is that these two have to be described
>> >> here and not in chflags(2), where the flags are actually defined?
>> >
>> > Unlike the other flags, they are not intuitive.  As
>> > they are exposed to the end-user (versus the
>> > programmer), it seems useful to describe them in
>> > section 1 of the manual pages.
>> 
>> FWIW, I agree that the flags are user-facing rather than (only)
>> programmer-facing, and thus should be described in a 1/8 manpage vs only
>> a 2 manpage.
>
> Then *all* of them should be described in a proper narration.  I'm not
> objecting to that.  I'm objecting to sticking the description of two
> of them chosen seemingly at random in a place selected seemingly at
> random.

OK, that's a perfectly reasonable objection.


Re: CVS commit: src/usr.bin/chflags

2023-05-25 Thread Valery Ushakov
On Thu, May 25, 2023 at 07:17:52 -0400, Greg Troxel wrote:

> Jan Schaumann  writes:
> 
> > Valery Ushakov  wrote:
> >> On Wed, May 24, 2023 at 22:33:17 +, Jan Schaumann wrote:
> >
> >> > Briefly describe the 'arch' and 'nodump' flags.
> >> 
> >> What makes them special and why is that these two have to be described
> >> here and not in chflags(2), where the flags are actually defined?
> >
> > Unlike the other flags, they are not intuitive.  As
> > they are exposed to the end-user (versus the
> > programmer), it seems useful to describe them in
> > section 1 of the manual pages.
> 
> FWIW, I agree that the flags are user-facing rather than (only)
> programmer-facing, and thus should be described in a 1/8 manpage vs only
> a 2 manpage.

Then *all* of them should be described in a proper narration.  I'm not
objecting to that.  I'm objecting to sticking the description of two
of them chosen seemingly at random in a place selected seemingly at
random.

Yes, I can see how archive vs dump might be puzzling.  But I still
maintain that the last change made the narration strictly worse
compositionally.

-uwe


Re: CVS commit: src/usr.bin/chflags

2023-05-25 Thread Valery Ushakov
On Wed, May 24, 2023 at 23:44:07 -0400, Jan Schaumann wrote:

> Valery Ushakov  wrote:
> > On Wed, May 24, 2023 at 22:33:17 +, Jan Schaumann wrote:
> 
> > > Briefly describe the 'arch' and 'nodump' flags.
> > 
> > What makes them special and why is that these two have to be described
> > here and not in chflags(2), where the flags are actually defined?
> 
> Unlike the other flags, they are not intuitive.  As
> they are exposed to the end-user (versus the
> programmer), it seems useful to describe them in
> section 1 of the manual pages.

This new paragraph is wedged right between the list of the options and
the continuation of that same paragraph that says that they can be
prefixed with "no".

A description of an obsolete flag right in the middle of the manpage
is a very poor narrative choice.

Calling nodump "not intuitive" is not intuitive.

Anyway, this change is strictly for the worse.  If you want to keep
these random tidbits of information, move them elsewhere, like HISTORY
section (which is probably the most appropriate place for the
obsolete, unused, compat-only msdos flag).

-uwe


Re: CVS commit: src/usr.bin/chflags

2023-05-25 Thread Greg Troxel
Jan Schaumann  writes:

> Valery Ushakov  wrote:
>> On Wed, May 24, 2023 at 22:33:17 +, Jan Schaumann wrote:
>
>> > Briefly describe the 'arch' and 'nodump' flags.
>> 
>> What makes them special and why is that these two have to be described
>> here and not in chflags(2), where the flags are actually defined?
>
> Unlike the other flags, they are not intuitive.  As
> they are exposed to the end-user (versus the
> programmer), it seems useful to describe them in
> section 1 of the manual pages.

FWIW, I agree that the flags are user-facing rather than (only)
programmer-facing, and thus should be described in a 1/8 manpage vs only
a 2 manpage.


Re: CVS commit: src/usr.bin/chflags

2023-05-24 Thread Jan Schaumann
Valery Ushakov  wrote:
> On Wed, May 24, 2023 at 22:33:17 +, Jan Schaumann wrote:

> > Briefly describe the 'arch' and 'nodump' flags.
> 
> What makes them special and why is that these two have to be described
> here and not in chflags(2), where the flags are actually defined?

Unlike the other flags, they are not intuitive.  As
they are exposed to the end-user (versus the
programmer), it seems useful to describe them in
section 1 of the manual pages.

> In any case, please, at least skim through mdoc.samples(7) once.

I did.  I suspect sometimes what's "obvious" ends up
being subjective, though.  'Cm' looked to me to be
intended for use with non-dash-preceded flags, not as
arguments to the command.  I might even have
considered 'Ar' more "obvious".

-Jan


Re: CVS commit: src/usr.bin/chflags

2023-05-24 Thread Valery Ushakov
On Wed, May 24, 2023 at 22:33:17 +, Jan Schaumann wrote:

> Module Name:  src
> Committed By: jschauma
> Date: Wed May 24 22:33:17 UTC 2023
> 
> Modified Files:
>   src/usr.bin/chflags: chflags.1
> 
> Log Message:
> Briefly describe the 'arch' and 'nodump' flags.

What makes them special and why is that these two have to be described
here and not in chflags(2), where the flags are actually defined?

In any case, please, at least skim through mdoc.samples(7) once.
Using Va, a "generic variable reference", is pretty obviously a wrong
choice for a command line argument I would think.  And nothing in the
surrounding source to cargo-cult from (which is not a bad strategy, in
general, if done judiciously) suggests that particular choice.

-uwe


CVS commit: src/usr.bin/chflags

2023-05-24 Thread Valery Ushakov
Module Name:src
Committed By:   uwe
Date:   Thu May 25 01:31:27 UTC 2023

Modified Files:
src/usr.bin/chflags: chflags.1

Log Message:
chflags(1): fix wrong markup in previous


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/usr.bin/chflags/chflags.1

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.bin/chflags

2023-05-24 Thread Valery Ushakov
Module Name:src
Committed By:   uwe
Date:   Thu May 25 01:31:27 UTC 2023

Modified Files:
src/usr.bin/chflags: chflags.1

Log Message:
chflags(1): fix wrong markup in previous


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/usr.bin/chflags/chflags.1

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/chflags/chflags.1
diff -u src/usr.bin/chflags/chflags.1:1.29 src/usr.bin/chflags/chflags.1:1.30
--- src/usr.bin/chflags/chflags.1:1.29	Wed May 24 22:33:17 2023
+++ src/usr.bin/chflags/chflags.1	Thu May 25 01:31:27 2023
@@ -1,4 +1,4 @@
-.\"	$NetBSD: chflags.1,v 1.29 2023/05/24 22:33:17 jschauma Exp $
+.\"	$NetBSD: chflags.1,v 1.30 2023/05/25 01:31:27 uwe Exp $
 .\"
 .\" Copyright (c) 1989, 1990, 1993, 1994
 .\"	The Regents of the University of California.  All rights reserved.
@@ -105,13 +105,13 @@ The following keywords are currently def
 .El
 .Pp
 The
-.Va arch
+.Cm arch
 flag is only used in connection with certain foreign
 filesystems (e.g., MS-DOS, where it indicates whether
 a file has been modified since it was last backed up).
 .Pp
 A file with the
-.Va nodump
+.Cm nodump
 flag set will by default only be backed up by
 .Xr dump 8
 during full backups.



CVS commit: src/usr.bin/chflags

2023-05-24 Thread Jan Schaumann
Module Name:src
Committed By:   jschauma
Date:   Wed May 24 22:33:17 UTC 2023

Modified Files:
src/usr.bin/chflags: chflags.1

Log Message:
Briefly describe the 'arch' and 'nodump' flags.


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/usr.bin/chflags/chflags.1

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/chflags/chflags.1
diff -u src/usr.bin/chflags/chflags.1:1.28 src/usr.bin/chflags/chflags.1:1.29
--- src/usr.bin/chflags/chflags.1:1.28	Fri May 19 19:50:59 2023
+++ src/usr.bin/chflags/chflags.1	Wed May 24 22:33:17 2023
@@ -1,4 +1,4 @@
-.\"	$NetBSD: chflags.1,v 1.28 2023/05/19 19:50:59 uwe Exp $
+.\"	$NetBSD: chflags.1,v 1.29 2023/05/24 22:33:17 jschauma Exp $
 .\"
 .\" Copyright (c) 1989, 1990, 1993, 1994
 .\"	The Regents of the University of California.  All rights reserved.
@@ -32,7 +32,7 @@
 .\"
 .\"	@(#)chflags.1	8.4 (Berkeley) 5/2/95
 .\"
-.Dd May 19, 2023
+.Dd May 24, 2023
 .Dt CHFLAGS 1
 .Os
 .Sh NAME
@@ -104,6 +104,18 @@ The following keywords are currently def
 .It Li uchg Ta user immutable Ta owner or super-user
 .El
 .Pp
+The
+.Va arch
+flag is only used in connection with certain foreign
+filesystems (e.g., MS-DOS, where it indicates whether
+a file has been modified since it was last backed up).
+.Pp
+A file with the
+.Va nodump
+flag set will by default only be backed up by
+.Xr dump 8
+during full backups.
+.Pp
 Putting the letters
 .Sq Cm no
 before a keyword causes the flag to be turned off.



CVS commit: src/usr.bin/chflags

2023-05-24 Thread Jan Schaumann
Module Name:src
Committed By:   jschauma
Date:   Wed May 24 22:33:17 UTC 2023

Modified Files:
src/usr.bin/chflags: chflags.1

Log Message:
Briefly describe the 'arch' and 'nodump' flags.


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/usr.bin/chflags/chflags.1

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.bin/chflags

2023-05-19 Thread Valery Ushakov
Module Name:src
Committed By:   uwe
Date:   Fri May 19 19:50:59 UTC 2023

Modified Files:
src/usr.bin/chflags: chflags.1

Log Message:
chflags(1): minor markup fixes


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/usr.bin/chflags/chflags.1

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/chflags/chflags.1
diff -u src/usr.bin/chflags/chflags.1:1.27 src/usr.bin/chflags/chflags.1:1.28
--- src/usr.bin/chflags/chflags.1:1.27	Fri May 19 16:14:00 2023
+++ src/usr.bin/chflags/chflags.1	Fri May 19 19:50:59 2023
@@ -1,4 +1,4 @@
-.\"	$NetBSD: chflags.1,v 1.27 2023/05/19 16:14:00 jschauma Exp $
+.\"	$NetBSD: chflags.1,v 1.28 2023/05/19 19:50:59 uwe Exp $
 .\"
 .\" Copyright (c) 1989, 1990, 1993, 1994
 .\"	The Regents of the University of California.  All rights reserved.
@@ -57,7 +57,7 @@ as specified by the
 operand.
 .Pp
 The options are as follows:
-.Bl -tag -width Ds
+.Bl -tag -width Fl
 .It Fl d
 If the change requested would not alter the
 flags currently set for
@@ -67,12 +67,12 @@ then attempt no change operation.
 If the
 .Fl R
 option is specified, symbolic links on the command line are followed.
-(Symbolic links encountered in the tree traversal are not followed.)
+Symbolic links encountered in the tree traversal are not followed.
 .It Fl h
 If the
 .Ar file
 or a file encountered during directory traversal is a symbolic link,
-the file flags of the link itself is changed.
+the file flags of the link itself are changed.
 .It Fl L
 If the
 .Fl R
@@ -84,33 +84,32 @@ option is specified, no symbolic links a
 .It Fl R
 Change the file flags for the file hierarchies rooted
 in the
-.Ar files
+.Ar file\^ Ns s
 instead of just the
-.Ar files
+.Ar file\^ Ns s
 themselves.
 .El
 .Pp
 Flags are a comma separated list of keywords.
 The following keywords are currently defined:
-.Bl -column -offset indent "Keyword   " "system append-only" "Permission"
+.\" XXX: list the actual chflags(2) macro names
+.Bl -column -offset indent ".Sy Keyword" "system append-only"
 .It Sy Keyword Ta Sy Flag Ta Sy Permission
-.It arch Ta archived Ta super-user only
-.It opaque Ta opaque Ta owner or super-user
-.It nodump Ta nodump Ta owner or super-user
-.It sappnd Ta system append-only Ta super-user only
-.It schg Ta system immutable Ta super-user only
-.It uappnd Ta user append-only Ta owner or super-user
-.It uchg Ta user immutable Ta owner or super-user
+.It Li arch Ta archived Ta super-user only
+.It Li opaque Ta opaque Ta owner or super-user
+.It Li nodump Ta nodump Ta owner or super-user
+.It Li sappnd Ta system append-only Ta super-user only
+.It Li schg Ta system immutable Ta super-user only
+.It Li uappnd Ta user append-only Ta owner or super-user
+.It Li uchg Ta user immutable Ta owner or super-user
 .El
 .Pp
 Putting the letters
-.Dq no
-before an option causes the flag to be turned off.
-For example:
-.Bl -tag -offset indent -width "nouchg"
-.It nouchg
-the immutable bit should be cleared
-.El
+.Sq Cm no
+before a keyword causes the flag to be turned off.
+For example,
+.Li nouchg
+requests the immutable bit should be cleared.
 .Pp
 The
 .Fl H ,
@@ -138,7 +137,7 @@ devices to be changed except by the supe
 .Pp
 Note that the ability to clear certain flags is
 dependent on the current kernel
-.Em securelevel .
+.Va securelevel .
 See
 .Xr secmodel_securelevel 9
 for details.



CVS commit: src/usr.bin/chflags

2023-05-19 Thread Valery Ushakov
Module Name:src
Committed By:   uwe
Date:   Fri May 19 19:50:59 UTC 2023

Modified Files:
src/usr.bin/chflags: chflags.1

Log Message:
chflags(1): minor markup fixes


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/usr.bin/chflags/chflags.1

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.bin/chflags

2023-05-19 Thread Jan Schaumann
Module Name:src
Committed By:   jschauma
Date:   Fri May 19 16:14:00 UTC 2023

Modified Files:
src/usr.bin/chflags: chflags.1

Log Message:
We mention secmodel_securelevel(9) in the details, so might as well add it to
SEE ALSO.


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/usr.bin/chflags/chflags.1

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/chflags/chflags.1
diff -u src/usr.bin/chflags/chflags.1:1.26 src/usr.bin/chflags/chflags.1:1.27
--- src/usr.bin/chflags/chflags.1:1.26	Thu May 18 19:08:16 2023
+++ src/usr.bin/chflags/chflags.1	Fri May 19 16:14:00 2023
@@ -1,4 +1,4 @@
-.\"	$NetBSD: chflags.1,v 1.26 2023/05/18 19:08:16 jschauma Exp $
+.\"	$NetBSD: chflags.1,v 1.27 2023/05/19 16:14:00 jschauma Exp $
 .\"
 .\" Copyright (c) 1989, 1990, 1993, 1994
 .\"	The Regents of the University of California.  All rights reserved.
@@ -32,7 +32,7 @@
 .\"
 .\"	@(#)chflags.1	8.4 (Berkeley) 5/2/95
 .\"
-.Dd May 18, 2023
+.Dd May 19, 2023
 .Dt CHFLAGS 1
 .Os
 .Sh NAME
@@ -152,4 +152,5 @@ for details.
 .Xr fts 3 ,
 .Xr symlink 7 ,
 .Xr dump 8 ,
-.Xr init 8
+.Xr init 8 ,
+.Xr secmodel_securelevel 9



CVS commit: src/usr.bin/chflags

2023-05-19 Thread Jan Schaumann
Module Name:src
Committed By:   jschauma
Date:   Fri May 19 16:14:00 UTC 2023

Modified Files:
src/usr.bin/chflags: chflags.1

Log Message:
We mention secmodel_securelevel(9) in the details, so might as well add it to
SEE ALSO.


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/usr.bin/chflags/chflags.1

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.bin/chflags

2023-05-18 Thread Jan Schaumann
Module Name:src
Committed By:   jschauma
Date:   Thu May 18 19:08:16 UTC 2023

Modified Files:
src/usr.bin/chflags: chflags.1

Log Message:
Note that the ability to change certain flags depends on the current 
securelevel.


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/usr.bin/chflags/chflags.1

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/chflags/chflags.1
diff -u src/usr.bin/chflags/chflags.1:1.25 src/usr.bin/chflags/chflags.1:1.26
--- src/usr.bin/chflags/chflags.1:1.25	Fri May  5 04:14:02 2023
+++ src/usr.bin/chflags/chflags.1	Thu May 18 19:08:16 2023
@@ -1,4 +1,4 @@
-.\"	$NetBSD: chflags.1,v 1.25 2023/05/05 04:14:02 kre Exp $
+.\"	$NetBSD: chflags.1,v 1.26 2023/05/18 19:08:16 jschauma Exp $
 .\"
 .\" Copyright (c) 1989, 1990, 1993, 1994
 .\"	The Regents of the University of California.  All rights reserved.
@@ -32,7 +32,7 @@
 .\"
 .\"	@(#)chflags.1	8.4 (Berkeley) 5/2/95
 .\"
-.Dd December 12, 2012
+.Dd May 18, 2023
 .Dt CHFLAGS 1
 .Os
 .Sh NAME
@@ -135,6 +135,13 @@ is used to display the flags.
 .Pp
 The kernel does not allow the flags on block and character
 devices to be changed except by the super-user.
+.Pp
+Note that the ability to clear certain flags is
+dependent on the current kernel
+.Em securelevel .
+See
+.Xr secmodel_securelevel 9
+for details.
 .Sh EXIT STATUS
 .Ex -std
 .Sh SEE ALSO



CVS commit: src/usr.bin/chflags

2023-05-18 Thread Jan Schaumann
Module Name:src
Committed By:   jschauma
Date:   Thu May 18 19:08:16 UTC 2023

Modified Files:
src/usr.bin/chflags: chflags.1

Log Message:
Note that the ability to change certain flags depends on the current 
securelevel.


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/usr.bin/chflags/chflags.1

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.bin/chflags

2023-04-28 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Fri Apr 28 22:23:45 UTC 2023

Modified Files:
src/usr.bin/chflags: chflags.c

Log Message:
one more place for recently fixed typo, s/phisycal/physical/.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/usr.bin/chflags/chflags.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.bin/chflags

2023-04-28 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Fri Apr 28 22:23:45 UTC 2023

Modified Files:
src/usr.bin/chflags: chflags.c

Log Message:
one more place for recently fixed typo, s/phisycal/physical/.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/usr.bin/chflags/chflags.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/chflags/chflags.c
diff -u src/usr.bin/chflags/chflags.c:1.16 src/usr.bin/chflags/chflags.c:1.17
--- src/usr.bin/chflags/chflags.c:1.16	Mon Aug 29 14:05:08 2011
+++ src/usr.bin/chflags/chflags.c	Fri Apr 28 22:23:45 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: chflags.c,v 1.16 2011/08/29 14:05:08 joerg Exp $	*/
+/*	$NetBSD: chflags.c,v 1.17 2023/04/28 22:23:45 andvar Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993, 1994
@@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1992, 19
 #if 0
 static char sccsid[] = "from: @(#)chflags.c	8.5 (Berkeley) 4/1/94";
 #else
-__RCSID("$NetBSD: chflags.c,v 1.16 2011/08/29 14:05:08 joerg Exp $");
+__RCSID("$NetBSD: chflags.c,v 1.17 2023/04/28 22:23:45 andvar Exp $");
 #endif
 #endif /* not lint */
 
@@ -167,7 +167,7 @@ main(int argc, char *argv[])
 			/*
 			 * The only symlinks that end up here are ones that
 			 * don't point to anything.  Note that if we are
-			 * doing a phisycal walk, we never reach here unless
+			 * doing a physical walk, we never reach here unless
 			 * we asked to follow explicitly.
 			 */
 			continue;