FAQ Search Today's Posts Mark Forums Read

» Linux Archive
Home
New Posts
Search
FAQ


Go Back   Linux Archive > Debian > Debian Kernel

 
 
LinkBack Thread Tools
 
Old 08-08-2008, 03:49 AM
Chris Lamb
 
Default Bug#494257: Please make log_begin_msg not emit trailing newline

Package: initramfs-tools
Version: 0.92e
Severity: minor
Tags: patch

Hi,

Please make log_begin_msg not emit a trailing newline - this makes the non-
"quiet" output cleaner and results in half as many lines being emitted. For
example:

Begin: Finding root filesytem ...
Done.

Becomes:

Begin: Finding root filesytem ... done.

Patch attached - it also adds a space and alters the case of "done" for
symmetry. This would be especially useful in Debian Live where we show a
large number of these messages by default.


Regards,

--
Chris Lamb, UK chris@chris-lamb.co.uk
GPG: 0x634F9A20
diff -urNad initramfs-tools-0.92e.orig/scripts/functions initramfs-tools-0.92e/scripts/functions
--- initramfs-tools-0.92e.orig/scripts/functions 2008-08-08 03:34:46.000000000 +0100
+++ initramfs-tools-0.92e/scripts/functions 2008-08-08 03:49:14.000000000 +0100
@@ -3,22 +3,22 @@
_log_msg()
{
if [ "$quiet" = "y" ]; then return; fi
- echo "$@"
+ printf "$@"
}

log_success_msg()
{
- _log_msg "Success: $@"
+ _log_msg "Success: $@
"
}

log_failure_msg()
{
- _log_msg "Failure: $@"
+ _log_msg "Failure: $@
"
}

log_warning_msg()
{
- _log_msg "Warning: $@"
+ _log_msg "Warning: $@
"
}

log_begin_msg()
@@ -26,7 +26,7 @@
if [ -x /sbin/usplash_write ]; then
/sbin/usplash_write "TEXT $@"
fi
- _log_msg "Begin: $@ ..."
+ _log_msg "Begin: $@ ... "
}

log_end_msg()
@@ -34,7 +34,7 @@
if [ -x /sbin/usplash_write ]; then
/sbin/usplash_write "SUCCESS ok"
fi
- _log_msg "Done."
+ _log_msg "done.
"
}

panic()
 

Thread Tools




All times are GMT. The time now is 03:59 PM.

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