tech-userlevel archive

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

Re: Increasing FreeBSD compatibility in mtree



Thanks to Christos for merging the majority of my changes.  I've found a few 
minor
issues while updating my tree that are corrected in the following diff.  The 
issues are:

 - -n is incorrectly supressing the ".." lines.
 - two entries for rmd160digest in misc.c.
 - No mention of -t in the usage message or the manpage SYNOPSIS
 - No "j" in the getopt string.

-- Brooks

Index: create.c
===================================================================
RCS file: /cvsroot/src/usr.sbin/mtree/create.c,v
retrieving revision 1.65
diff -u -r1.65 create.c
--- create.c    5 Oct 2012 01:21:44 -0000       1.65
+++ create.c    11 Dec 2012 19:14:51 -0000
@@ -142,9 +142,12 @@
                        statf(indent, p);
                        break;
                case FTS_DP:
-                       if (!nflag && p->fts_level > 0)
-                               printf("%*s# %s\n%*s..\n\n", indent, "",
-                                   p->fts_path, indent, "");
+                       if (p->fts_level > 0) {
+                               if (!nflag)
+                                       printf("%*s# %s\n", indent, "",
+                                           p->fts_path);
+                               printf("%*s..\n\n", indent, "");
+                       }
                        break;
                case FTS_DNR:
                case FTS_ERR:
Index: misc.c
===================================================================
RCS file: /cvsroot/src/usr.sbin/mtree/misc.c,v
retrieving revision 1.32
diff -u -r1.32 misc.c
--- misc.c      5 Oct 2012 01:31:05 -0000       1.32
+++ misc.c      11 Dec 2012 19:14:51 -0000
@@ -74,7 +74,6 @@
        {"nochange",    F_NOCHANGE,     0},
        {"optional",    F_OPT,          0},
        {"ripemd160digest", F_RMD160,   NEEDVALUE},
-       {"rmd160digest",F_RMD160,       NEEDVALUE},
        {"rmd160",      F_RMD160,       NEEDVALUE},
        {"rmd160digest",F_RMD160,       NEEDVALUE},
        {"sha1",        F_SHA1,         NEEDVALUE},
Index: mtree.8
===================================================================
RCS file: /cvsroot/src/usr.sbin/mtree/mtree.8,v
retrieving revision 1.63
diff -u -r1.63 mtree.8
--- mtree.8     5 Oct 2012 09:18:02 -0000       1.63
+++ mtree.8     11 Dec 2012 19:14:51 -0000
@@ -64,7 +64,7 @@
 .Nd map a directory hierarchy
 .Sh SYNOPSIS
 .Nm
-.Op Fl CcDdejLlMnPqrSUuWx
+.Op Fl CcDdejLlMnPqrStUuWx
 .Op Fl i | Fl m
 .Op Fl E Ar tags
 .Op Fl f Ar spec
Index: mtree.c
===================================================================
RCS file: /cvsroot/src/usr.sbin/mtree/mtree.c,v
retrieving revision 1.42
diff -u -r1.42 mtree.c
--- mtree.c     5 Oct 2012 09:18:08 -0000       1.42
+++ mtree.c     11 Dec 2012 19:14:51 -0000
@@ -80,7 +80,7 @@
        spec2 = NULL;
 
        while ((ch = getopt(argc, argv,
-           "cCdDeE:f:I:ik:K:lLmMnN:p:PqrR:s:StuUWxX:"))
+           "cCdDeE:f:I:ijk:K:lLmMnN:p:PqrR:s:StuUWxX:"))
            != -1) {
                switch((char)ch) {
                case 'c':
@@ -257,7 +257,7 @@
 {
 
        fprintf(stderr,
-           "usage: %s [-CcDdejLlMnPqrSUuWx] [-i|-m] [-E tags]\n"
+           "usage: %s [-CcDdejLlMnPqrStUuWx] [-i|-m] [-E tags]\n"
            "\t\t[-f spec] [-f spec]\n"
            "\t\t[-I tags] [-K keywords] [-k keywords] [-N dbdir] [-p path]\n"
            "\t\t[-R keywords] [-s seed] [-X exclude-file]\n",

Attachment: pgpaBZApUsOnq.pgp
Description: PGP signature



Home | Main Index | Thread Index | Old Index