projects
/
pve-common.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
60f4e8c
)
upid_read_status: scan 4096 bytes to extract status
author
Dietmar Maurer
<dietmar@proxmox.com>
Fri, 15 Mar 2013 09:18:54 +0000
(10:18 +0100)
committer
Dietmar Maurer
<dietmar@proxmox.com>
Fri, 15 Mar 2013 09:18:54 +0000
(10:18 +0100)
Else we get 'unexpected status' if error message is longer than
1024 bytes (which happens quite often).
data/PVE/Tools.pm
patch
|
blob
|
blame
|
history
diff --git
a/data/PVE/Tools.pm
b/data/PVE/Tools.pm
index
20fc1ea
..
a55e427
100644
(file)
--- 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);