From: Dietmar Maurer Date: Fri, 15 Mar 2013 09:18:54 +0000 (+0100) Subject: upid_read_status: scan 4096 bytes to extract status X-Git-Url: https://git.proxmox.com/?p=pve-common.git;a=commitdiff_plain;h=cc9121d3949931024a4cfbb25afebb51d586cf33 upid_read_status: scan 4096 bytes to extract status Else we get 'unexpected status' if error message is longer than 1024 bytes (which happens quite often). --- diff --git a/data/PVE/Tools.pm b/data/PVE/Tools.pm index 20fc1ea..a55e427 100644 --- a/data/PVE/Tools.pm +++ b/data/PVE/Tools.pm @@ -740,7 +740,7 @@ sub upid_read_status { my ($task, $filename) = upid_decode($upid); my $fh = IO::File->new($filename, "r"); return "unable to open file - $!" if !$fh; - my $maxlen = 1024; + my $maxlen = 4096; sysseek($fh, -$maxlen, 2); my $readbuf = ''; my $br = sysread($fh, $readbuf, $maxlen);