Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

user/2959: wrong documentation of syntax for timeranges in pax(1)

From: Christian von Roques <roques(at)mti.ag>
Date: Mon Oct 14 2002 - 09:34:18 EDT


>Number: 2959
>Category: user
>Synopsis: wrong documentation of syntax for timeranges in pax(1)
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: doc-bug
>Submitter-Id: net
>Arrival-Date: Thu Nov 07 13:23:05 MST 2002
>Closed-Date:
>Last-Modified:
>Originator: Christian von Roques
>Release: 3.1
>Organization:

net
>Environment:

	System      : OpenBSD 3.1
	Architecture: OpenBSD.i386
	Machine     : i386

>Description:
pax(1) describes the format of timeranges (-T) as: [yy[mm[dd[hh]]]]mm[.ss] Whereas the code actually parses like: [[[[yy]mm]dd]hh]mm[.ss] Even the rest of the textual documentation describes correctly what the code does. It's just the (formal) syntax which is wrong.
>How-To-Repeat:
$ man pax look for -T

>Fix:

Apply the following patch:
Index: pax.1

RCS file: /cvs/src/bin/pax/pax.1,v
retrieving revision 1.31
diff -w -u -d -r1.31 pax.1
--- pax.1	2002/02/11 18:43:51	1.31
+++ pax.1	2002/10/14 12:55:13

@@ -896,7 +896,7 @@
 A time range is made up of six different fields and each field must contain two  digits.
 The format is:
-.Dl [yy[mm[dd[hh]]]]mm[.ss]
+.Dl [[[[yy]mm]dd]hh]mm[.ss]
 Where
 .Cm yy
 is the last two digits of the year,
Index: sel_subs.c

RCS file: /cvs/src/bin/pax/sel_subs.c,v
retrieving revision 1.10
diff -w -u -d -r1.10 sel_subs.c
--- sel_subs.c	2002/02/19 19:39:35	1.10
+++ sel_subs.c	2002/10/14 12:55:13

@@ -315,7 +315,7 @@
  • trng_add()
  • add a time range match to the time range list.
  • This is a non-standard pax option. Lower and upper ranges are in the - * format: [yy[mm[dd[hh]]]]mm[.ss] and are comma separated. + * format: [[[[yy]mm]dd]hh]mm[.ss] and are comma separated.
  • Time ranges are based on current time, so 1234 would specify a time of
  • 12:34 today.
  • Return: @@ -375,7 +375,7 @@ }
 	/*
-	 * by default we only will check file mtime, but usee can specify
+	 * by default we only will check file mtime, but user can specify
 	 * mtime, ctime (inode change time) or both.
 	 */
 	if ((flgpt == NULL) || (*flgpt == '\0'))
@@ -451,7 +451,7 @@
 	return(0);
 
     out:
-	paxwarn(1, "Time range format is: [yy[mm[dd[hh]]]]mm[.ss][/[c][m]]");
+	paxwarn(1, "Time range format is: [[[[yy]mm]dd]hh]mm[.ss][/[c][m]]");
 	return(-1);

 }  

@@ -525,7 +525,7 @@  

 /*
  * str_sec()
- *	Convert a time string in the format of [yy[mm[dd[hh]]]]mm[.ss] to gmt
+ *	Convert a time string in the format of [[[[yy]mm]dd]hh]mm[.ss] to gmt
  *	seconds. Tval already has current time loaded into it at entry.
  * Return:
  *	0 if converted ok, -1 otherwise

>Release-Note:
Received on Thu Nov 7 16:47:54 2002

This archive was generated by hypermail 2.1.8 : Wed Aug 23 2006 - 13:29:37 EDT


Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library