dealing with timestamp (in-)accuracy

Lasse Kliemann <[email protected]> Thu, 6 Mar 2008 13:22:36 +0100
Newsgroups gmane.comp.archivers.star.user
Message-ID <[email protected]>
--===============1274475320==
Content-Type: multipart/signed; micalg=pgp-sha1;
	protocol="application/pgp-signature"; boundary="HlL+5n6rz5pIUxbD"
Content-Disposition: inline


--HlL+5n6rz5pIUxbD
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

In create.c of star-1.5a87, line 281, it reads:

   } else if (dumplevel > 0) {
      if (info->f_mtime > Newer.tv_sec) {
         /* EMPTY */
         ;
      } else if (info->f_ctime > Newer.tv_sec) {
         if (dumpmeta)
            info->f_xftype =3D XT_META;
      } else {
         return (FALSE);
      }

As far as I can see, this is the place where it is decided upon whether a=
=20
file will be included in the current dump, or if it may be assumed that it =
is=20
already included in a previous dump (and hence will not be included again).=
 I=20
wonder whether the checks shouldn't be for greater *or* *equal*, i.e.:

      if (info->f_mtime >=3D Newer.tv_sec) {
         /* EMPTY */
         ;
      } else if (info->f_ctime >=3D Newer.tv_sec) {

If 'tv_sec' means what I guess it means, namely seconds, then this is=20
necessary, because (on Linux) it is no problem to sequentially create=20
hundreds of files that have the same time if measured with an accuracy of=
=20
seconds. (In fact, the unit of one second seems to be the accuracy of Linux=
=20
file times.)


Further down, it reads:

   } else if (Newer.tv_sec && (Ctime ? info->f_ctime:info->f_mtime) <=3D
                        Newer.tv_sec) {

Maybe it should be '>' here, i.e.:

   } else if (Newer.tv_sec && (Ctime ? info->f_ctime:info->f_mtime) >
                        Newer.tv_sec) {

but I am not so sure about that (since I am not sure what this statement is=
=20
for).


Lasse

--HlL+5n6rz5pIUxbD
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (GNU/Linux)

iQIcBAEBAgAGBQJHz+IMAAoJEFYll6N4nhdvRLoQAKbR+/v7xtPE+xdkN37PmEoI
O6q1lZ0xSeJl3XqqKA5zmP0WXrpBDor7HlCVyt1oiTQ2z0AJhLPmuaW/2coAYrgr
yCbodBZNEcwVf0DfGcAew1iAtVB8JdB6lVXx2niMpL93h3w8gKel3w0nFmG84++O
dp74ou7B6YII4/LWAgQ/60TOy6MfZnbrqpCHN7lguO9DtiJyKjF1AEFphQUxPa4k
yLL6n5dzpj79rgs9DTdQ1Y6hsY5/hVcpKj7Ao4HwTqry+qZwE8OHddi3CbmchqWk
EAkKAPyNaSOBJ+/M0lEzTeq5YajDJ+BI4KowEt0QvyJN387UmZHwUJS71hgps8fR
MY+sM1IpK4+CIO6DmILWW30FpFZ/MXj6NDghGeU7UKmy6g8nOjGOfe3bYoFhyIU4
8gs92waCG5azhfHxLycVlCGf6/Dk2WStRZ96UknG/aehDaDMQ6C59KWbQoLWbT52
d6KwOXqcecHsi+Ul3VUPM2OG5B4cRKv0ErGx2HARvtevx6zduM9DKkoS5KCPn0Rs
+TD6+Eqg05Hkq53vG0f/84b3v6OXwgF7Q79Zn0F4HedV/nGAbT+hvinM87aRj5LT
JGvIYc2fvNw0P3RRvXVznse04gtFkBktM2d2EhU/opcGZWfKbLYwPYV2Pceq+U5I
oCJxvEalYL6Lf9m9ZbFp
=HSuT
-----END PGP SIGNATURE-----

--HlL+5n6rz5pIUxbD--

--===============1274475320==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Star-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/star-users

--===============1274475320==--