summaryrefslogtreecommitdiffstats
path: root/move/tools/scan-etc.pl
diff options
context:
space:
mode:
authorGuillaume Cottenceau <gc@mandriva.com>2003-11-19 22:43:05 +0000
committerGuillaume Cottenceau <gc@mandriva.com>2003-11-19 22:43:05 +0000
commit1c020e8773dd48c98b00117619d923484785e215 (patch)
tree2dd1fc20b54b60af2130e27861b2b71afb1ffb0c /move/tools/scan-etc.pl
parent31fc5d17fb0ce9b0f740be68e2f9e41785e46814 (diff)
downloaddrakx-backup-do-not-use-1c020e8773dd48c98b00117619d923484785e215.tar
drakx-backup-do-not-use-1c020e8773dd48c98b00117619d923484785e215.tar.gz
drakx-backup-do-not-use-1c020e8773dd48c98b00117619d923484785e215.tar.bz2
drakx-backup-do-not-use-1c020e8773dd48c98b00117619d923484785e215.tar.xz
drakx-backup-do-not-use-1c020e8773dd48c98b00117619d923484785e215.zip
i do suck much
Diffstat (limited to 'move/tools/scan-etc.pl')
-rwxr-xr-xmove/tools/scan-etc.pl15
1 files changed, 2 insertions, 13 deletions
diff --git a/move/tools/scan-etc.pl b/move/tools/scan-etc.pl
index 7a2c046cb..66415d4de 100755
--- a/move/tools/scan-etc.pl
+++ b/move/tools/scan-etc.pl
@@ -12,20 +12,9 @@
use MDK::Common;
-sub date_to_raw {
- my ($y, $m, $d, $h, $mi, $s) = $_[0] =~ /\s(\d+)-(\d+)-(\d+)\s(\d+):(\d+):(\d+)\./;
- ($y-1970)*32140800 + $m*2678400 + $d*86400 + $h*3600 + $mi*60 + $s;
-}
-
sub stat_ {
- my ($f) = @_;
-
- my (undef, undef, undef, undef, $a, $m, $c) = `stat $f`;
-
- my $araw = date_to_raw($a);
- my $mraw = max(date_to_raw($m), date_to_raw($c));
-
- [ $araw, $mraw ];
+ my ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime,$blksize,$blocks) = stat $_[0];
+ [ $atime, max($mtime, $ctime) ];
}
our $reference = (stat_('/dummy'))->[0];