On Mon, 2015-11-23 at 14:34 -0800, Gayatri Kammela wrote:
Perhaps you can shorten the commit subject. "luv-test-manager: Group all
the warning messages" should be enough. You explain in the body the
benefit of your change.
Luv has different warning messages to be displayed depending
on the situation. Giving the proper names for the warning messages
improves readability and grouping them together improves maintainability.
Cc: Ricardo Neri <ricardo.neri-calderon(a)linux.intel.com>
Signed-off-by: Gayatri Kammela <gayatri.kammela(a)intel.com>
---
meta-luv/recipes-core/initscripts/initscripts/luv-test-manager | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/meta-luv/recipes-core/initscripts/initscripts/luv-test-manager
b/meta-luv/recipes-core/initscripts/initscripts/luv-test-manager
index 6c11ae537cbb..f216802a57ff 100644
--- a/meta-luv/recipes-core/initscripts/initscripts/luv-test-manager
+++ b/meta-luv/recipes-core/initscripts/initscripts/luv-test-manager
@@ -2,6 +2,12 @@
# Copyright 2014 Intel Corporation; author Matt Fleming
#
+#warn the user when no partition is found
+Missing_partition_alert="STOP! No partition found to store the results..please
report to luv(a)lists.01.org"
What about having a standardization of naming? maybe
alert_missing_partition
alert_some_other_alert?
In the future we could have other kinds of strings.
Thanks and BR,
Ricardo
+
+#warn the user when the disk is nearly full
+Disk_space_alert="Removable disk space is running low , please backup and empty the
disk to try again !!"
Hmmm, is not used in this patch. It would be better to include it with
the patch that actually uses it. The purpose of this patch can be to
create the place in which the messages are being grouped.
+
grep -q noluv /proc/cmdline
if [ $? -ne 1 ]; then
exit 0
@@ -29,10 +35,9 @@ LUV_DISK_DEVICE=/dev/disk/by-uuid/${LUV_PARTITION_UUID}
## checking if the partiton is matched , else results
## cannot be saved in the removable media after tests are done
-warning="STOP! No partition found to store the results..please report to
luv(a)lists.01.org"
ls /dev/disk/by-uuid | grep -q ${LUV_PARTITION_UUID}
if [ $? -eq 1 ] ; then
- psplash_write " MSG $warning "
+ psplash_write " MSG $Missing_partition_alert"
if [ -e $FIFO ]; then
umount -l /mnt/.psplash
fi