DragonFly commits List (threaded) for 2008-11
DragonFly BSD
DragonFly commits List (threaded) for 2008-11
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: cvs commit: src/usr.bin/chflags chflags.1 chflags.c


From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxx>
Date: Mon, 10 Nov 2008 19:27:17 -0800 (PST)

:pavalos     2008/11/10 18:55:13 PST
:    usr.bin/chflags      chflags.1 chflags.c 
:  Log:
:  Add an interface to the lchflags(2) syscall.  The new -h option will
:  change the flags on the symlink.

    It has to be conditionalized so it doesn't break buildworld
    on a pre-lchflags system, which is all systems since they
    have to buildworld to get from a pre-lchflags system to a
    post-lchflags system :-)

    This will do it:

					-Matt
					Matthew Dillon 
					<dillon@backplane.com>

Index: chflags.c
===================================================================
RCS file: /cvs/src/usr.bin/chflags/chflags.c,v
retrieving revision 1.6
diff -u -p -r1.6 chflags.c
--- chflags.c	11 Nov 2008 02:55:13 -0000	1.6
+++ chflags.c	11 Nov 2008 03:25:37 -0000
@@ -36,6 +36,7 @@
  * $DragonFly: src/usr.bin/chflags/chflags.c,v 1.6 2008/11/11 02:55:13 pavalos Exp $
  */
 
+#include <sys/param.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 
@@ -104,9 +105,11 @@ main(int argc, char **argv)
 	} else
 		fts_options = FTS_LOGICAL;
 
+#if __DragonFly_version >= 200101
 	if (hflag)
 		change_flags = lchflags;
 	else
+#endif
 		change_flags = chflags;
 
 	flags = *argv;



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]