X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=test%2Fudevd-test%2Fudev-log-amplify.pl;h=9e2692ac0c4e5fdbe3eff1fd276b705a69b66a51;hp=c2d472397414ddd4c5a248bd65d39b0a7f57b329;hb=98446db5533596fd4d32f5019479d37d9495f1a1;hpb=7d855c3116ec9ddab9adde96b568681930d9855b diff --git a/test/udevd-test/udev-log-amplify.pl b/test/udevd-test/udev-log-amplify.pl index c2d472397..9e2692ac0 100644 --- a/test/udevd-test/udev-log-amplify.pl +++ b/test/udevd-test/udev-log-amplify.pl @@ -38,35 +38,11 @@ use strict; my $udev_exe_time = 5; my $log_file = "/tmp/udev_log.txt"; -# global variables -my $devpath; -my $action; -my $subsystem; - -# common functions -sub getDate { - # Get current date/time - # If we want GTM time, simply pass GMT as first argument to this function. - - my $format = @_; - my $date; - - if( $format =~ /GMT/i ) { - $date = gmtime() . " GMT"; - } else { - $date = localtime(); - } - return $date; -} - -# main program if ($ARGV[0]) { - $subsystem = $ARGV[0]; - $devpath = $ENV{DEVPATH}; - $action = $ENV{ACTION}; - - # Get current system date - my $time = getDate(); + my $subsystem = $ARGV[0]; + my $devpath = $ENV{DEVPATH}; + my $action = $ENV{ACTION}; + my $time = time(); # Logging if (open(LOGF, ">>$log_file")) {