Mageia Bugzilla – Attachment 2348 Details for
Bug 5979
set a 30s timeout for blkid
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
New Account
|
Forgot Password
[patch]
reduce blkid timeout to 30s
5979.diff (text/plain), 1.01 KB, created by
Thierry Vignaud
on 2012-05-20 14:54:37 CEST
(
hide
)
Description:
reduce blkid timeout to 30s
Filename:
MIME Type:
Creator:
Thierry Vignaud
Created:
2012-05-20 14:54:37 CEST
Size:
1.01 KB
patch
obsolete
>diff --git a/perl-install/fs/type.pm b/perl-install/fs/type.pm >index 6318e68..5288046 100644 >--- a/perl-install/fs/type.pm >+++ b/perl-install/fs/type.pm >@@ -273,7 +273,7 @@ sub call_blkid { > > my %h = map { > if_(/(.*?)=(.*)/, $1 => $2); >- } run_program::get_stdout('blkid', '2>', '/dev/null', '-o', 'udev', '-p', devices::make($part->{device})); >+ } run_program::get_stdout_raw({ timeout => 30 }, 'blkid', '2>', '/dev/null', '-o', 'udev', '-p', devices::make($part->{device})); > > \%h; > } >diff --git a/perl-install/run_program.pm b/perl-install/run_program.pm >index 7c0ba92..bc3656b 100644 >--- a/perl-install/run_program.pm >+++ b/perl-install/run_program.pm >@@ -32,6 +32,12 @@ sub get_stdout { > run($name, '>', \@r, @args) or return; > wantarray() ? @r : join('', @r); > } >+sub get_stdout_raw { >+ my ($options, $name, @args) = @_; >+ my @r; >+ raw($options, $name, '>', \@r, @args) or return; >+ wantarray() ? @r : join('', @r); >+} > sub rooted_get_stdout { > my ($root, $name, @args) = @_; > my @r;
diff --git a/perl-install/fs/type.pm b/perl-install/fs/type.pm index 6318e68..5288046 100644 --- a/perl-install/fs/type.pm +++ b/perl-install/fs/type.pm @@ -273,7 +273,7 @@ sub call_blkid { my %h = map { if_(/(.*?)=(.*)/, $1 => $2); - } run_program::get_stdout('blkid', '2>', '/dev/null', '-o', 'udev', '-p', devices::make($part->{device})); + } run_program::get_stdout_raw({ timeout => 30 }, 'blkid', '2>', '/dev/null', '-o', 'udev', '-p', devices::make($part->{device})); \%h; } diff --git a/perl-install/run_program.pm b/perl-install/run_program.pm index 7c0ba92..bc3656b 100644 --- a/perl-install/run_program.pm +++ b/perl-install/run_program.pm @@ -32,6 +32,12 @@ sub get_stdout { run($name, '>', \@r, @args) or return; wantarray() ? @r : join('', @r); } +sub get_stdout_raw { + my ($options, $name, @args) = @_; + my @r; + raw($options, $name, '>', \@r, @args) or return; + wantarray() ? @r : join('', @r); +} sub rooted_get_stdout { my ($root, $name, @args) = @_; my @r;
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 5979
:
2341
|
2342
| 2348