FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > CentOS > CentOS

 
 
LinkBack Thread Tools
 
Old 06-20-2012, 12:11 AM
Will Woods
 
Default mkefiboot: add --debug

You can use the --debug flag to get debugging output from mkefiboot and
pylorax.imgutils. Helpful!
---
src/sbin/mkefiboot | 9 +++++++++
1 file changed, 9 insertions(+)

diff --git a/src/sbin/mkefiboot b/src/sbin/mkefiboot
index d546b0e..fb695ed 100755
--- a/src/sbin/mkefiboot
+++ b/src/sbin/mkefiboot
@@ -17,6 +17,10 @@
#
# Red Hat Author(s): Will Woods <wwoods@redhat.com>

+import logging
+logging.basicConfig()
+log = logging.getLogger()
+
import os, tempfile, argparse
from subprocess import check_call, PIPE
from pylorax.imgutils import mkdosimg, round_to_blocks, LoopDev, DMDev, dm_detach
@@ -106,6 +110,9 @@ def mkefidisk(efiboot, outfile):

if __name__ == '__main__':
parser = argparse.ArgumentParser(description="Make an EFI boot image from the given directory.")
+ parser.add_argument("--debug", action="store_const", const=logging.DEBUG,
+ dest="loglevel", default=log.getEffectiveLevel(),
+ help="print debugging info")
parser.add_argument("-d", "--disk", action="store_true",
help="make a full EFI disk image (including partition table)")
parser.add_argument("-a", "--apple", action="store_const", const="apple",
@@ -124,6 +131,8 @@ if __name__ == '__main__':
parser.add_argument("outfile", metavar="OUTPUTFILE",
help="output file to write")
opt = parser.parse_args()
+ # logging
+ log.setLevel(opt.loglevel)
# sanity checks
if not os.path.isdir(opt.bootdir):
parser.error("%s is not a directory" % opt.bootdir)
--
1.7.10.2

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 

Thread Tools




All times are GMT. The time now is 02:58 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org