diff options
author | hpa <hpa> | 1998-04-15 03:07:22 +0000 |
---|---|---|
committer | hpa <hpa> | 1998-04-15 03:07:22 +0000 |
commit | 3875d86266cbeb5cc1764b5d31b0ce6908612b30 (patch) | |
tree | f579bacc8dbc8a6acd88ffda2766aba135fdbae8 /now.pl | |
parent | 76fd2d8d445379561bc4c19f420d5d4abaa34bca (diff) | |
download | syslinux-3875d86266cbeb5cc1764b5d31b0ce6908612b30.tar.gz |
Fix old kernel, OS/2, and mem= bugs. Ready for 1.36 release.syslinux-1.36
Diffstat (limited to 'now.pl')
-rw-r--r-- | now.pl | 13 |
1 files changed, 11 insertions, 2 deletions
@@ -1,7 +1,16 @@ #!/usr/bin/perl #ident "$Id$" # -# Print the time as a hexadecimal integer +# Print the time (possibly the mtime of a file) as a hexadecimal integer # -printf "0x%08x\n", time; +($file) = @ARGV; +if ( defined($file) ) { + ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime, + $ctime,$blksize,$blocks) = stat($file); + $now = $mtime; +} else { + $now = time; +} + +printf "0x%08x\n", $now; |