Login
Log in using an SSO provider:
Fedora Account System
Red Hat Associate
Red Hat Customer
Login using a Red Hat Bugzilla account
Forgot Password
Create an Account
Red Hat Bugzilla – Attachment 692172 Details for
Bug 875356
OS prober is slow
Home
New
Search
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh90 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
[?]
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
0003-Factor-out-logger.patch
0003-Factor-out-logger.patch (text/plain), 3.15 KB, created by
John Reiser
on 2013-02-03 01:55:54 UTC
(
hide
)
Description:
0003-Factor-out-logger.patch
Filename:
MIME Type:
Creator:
John Reiser
Created:
2013-02-03 01:55:54 UTC
Size:
3.15 KB
patch
obsolete
>From ca401eaaa1bf392e543f4b2f6d11f0b899fa1cb5 Mon Sep 17 00:00:00 2001 >From: John Reiser <jreiser@BitWagon.com> >Date: Sat, 2 Feb 2013 17:40:38 -0800 >Subject: [PATCH 3/3] Factor out 'logger'. > >--- > common.sh | 24 ++++++++++++++++-------- > linux-boot-prober | 10 ++++++++++ > os-prober | 10 ++++++++++ > 3 files changed, 36 insertions(+), 8 deletions(-) > >diff --git a/common.sh b/common.sh >index 30e245e..d256999 100644 >--- a/common.sh >+++ b/common.sh >@@ -62,10 +62,14 @@ cache_progname() { > esac > } > >-log() { >- cache_progname >- logger -t "$progname" "$@" >-} >+# fd_logger: bind value now, possibly after assigning default. >+eval ' >+ log() { >+ cache_progname >+ echo "$progname: $@" 1>&'${fd_logger:=9}' >+ } >+' >+export fd_logger # so subshells inherit current value by default > > error() { > log "error: $@" >@@ -79,10 +83,14 @@ debug() { > log "debug: $@" > } > >-result () { >- log "result:" "$@" >- echo "$@" >-} >+# fd_result: bind value now, possibly after assigning default. >+eval ' >+ result() { >+ log "result:" "$@" >+ echo "$@" 1>&'${fd_result:=1}' >+ } >+' >+export fd_result # so subshells inherit current value by default > > # shim to make it easier to use os-prober outside d-i > if ! type mapdevfs >/dev/null 2>&1; then >diff --git a/linux-boot-prober b/linux-boot-prober >index eb2aa37..42d8589 100755 >--- a/linux-boot-prober >+++ b/linux-boot-prober >@@ -6,6 +6,13 @@ > export execpfx="${2:-/usr/share/os-prober}" > export libexecpfx="${2:-/usr/libexec}/linux-boot-probes" > >+# dash shell does not have "{varname}>&1" feature that bash shell has >+# for auto-assignment of new filedescriptors. >+# It is cumbersome to write the 'eval' to use our own variables in redirections. >+# Therefore use fixed numbers. >+export fd_result=3 # file descriptor for external results >+export fd_logger=9 # file descriptor for input to logger >+ > . $execpfx/common.sh > > set -e >@@ -27,6 +34,7 @@ if ! mapped="$(mapdevfs "$partition")"; then > continue > fi > >+( ( > if ! grep -q "^$mapped " "$OS_PROBER_TMP/mounted-map"; then > for test in $libexecpfx/* \ > $libexecpfx/x86/* \ >@@ -72,3 +80,5 @@ else > fi > fi > fi >+) 9>&1 | logger 1>&- # fd_logger >+) 3>&1 # fd_result >diff --git a/os-prober b/os-prober >index bfac48e..ea7c56f 100755 >--- a/os-prober >+++ b/os-prober >@@ -7,6 +7,13 @@ set -e > export execpfx="${1:-/usr/share/os-prober}" > export libexecpfx="${1:-/usr/libexec}/os-probes" > >+# dash shell does not have "{varname}>&1" feature that bash shell has >+# for auto-assignment of new filedescriptors. >+# It is cumbersome to write the 'eval' to use our own variables in redirections. >+# Therefore use fixed numbers. >+export fd_result=3 # file descriptor for external results >+export fd_logger=9 # file descriptor for input to logger >+ > . $execpfx/common.sh > > newns "$@" >@@ -125,6 +132,7 @@ if [ -f /proc/mdstat ] ; then > grep "^md" /proc/mdstat | parse_proc_mdstat >"$OS_PROBER_TMP/raided-map" || true > fi > >+( ( > for partition in $(partitions); do > if ! mapped="$(mapdevfs "$partition")"; then > log "Device '$partition' does not exist; skipping" >@@ -176,3 +184,5 @@ for partition in $(partitions); do > fi > fi > done >+) 9>&1 | logger 1>&- # fd_logger >+) 3>&1 # fd_result >-- >1.8.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 875356
:
652201
|
688069
|
689262
|
689263
|
689264
|
689265
|
692170
|
692171
| 692172