[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [PATCH 1/2 rhel5-branch f14-branch master] Add noeject support to loader2 (#477887)



On 09/04/2010 12:02 AM, Brian C. Lane wrote:
When noeject is passed on the kernel command line disable ejecting the
cdrom.

Related: rhbz#477887
---
  loader2/cdinstall.c |   30 +++++++++++++++++++++++-------
  loader2/loader.c    |    6 ++++--
  loader2/loader.h    |    2 ++
  3 files changed, 29 insertions(+), 9 deletions(-)

diff --git a/loader2/cdinstall.c b/loader2/cdinstall.c
index 0b47b6a..ee837ad 100644
--- a/loader2/cdinstall.c
+++ b/loader2/cdinstall.c
@@ -108,8 +108,11 @@ static char * mediaCheckCdrom(char *cddriver) {
                  free(descr);
          }

-        ejectCdrom();
-	
+        if (!FL_NOEJECT(flags))
+            ejectCdrom();
+        else
+            logMessage(INFO, "noeject in effect, not ejecting cdrom");
+

Ack in general.

You can optionally define a helper function somewhere, something like eject_cdrom_if(flags) and that will check the flag itself. Given it's rhel5 anyway and it's loader anyway I do not insist at all.

Ales


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]