Chameleon

Issue 127: Need new boolean to hide sleepimage notification.

Reported by Polish OX, Jul 25, 2011

Steps to reproduce the problem:
1. Boot chameleon gui
2. Select partition to boot desired OS
3. Watch in the location of the boot banner to see notification

Expected result:

Option to hide this message as it's irrelevant.

Actual result:

Message is shown everytime and could be fixed with a new 
boolean/boot argument.

Comment 1 by Cosmosis Jones, Jul 28, 2011

how about just not showing it unless ForceWake=Y ?

Comment 2 by Cosmosis Jones, Jul 28, 2011

Status: Accepted
Owner: cosmo1t

Comment 3 by Cosmosis Jones, Jul 28, 2011

Labels: Type:Enhancement Target:2.1 Type:Defect

Comment 4 by Cosmosis Jones, Jul 28, 2011

if (!getBoolForKey (kWake, &tryresume, 
&bootInfo->chameleonConfig)) {
                        tryresume = true;
                        tryresumedefault = true;
                } else {
                        tryresumedefault = false;
                }

                if (!getBoolForKey (kForceWake, &forceresume, 
&bootInfo->chameleonConfig)) {
                        forceresume = false;
                }

                if (forceresume) {
                        tryresume = true;
                        tryresumedefault = false;
                }

                while (tryresume) {
                        const char *tmp;
                        BVRef bvr;
                        if (!getValueForKey(kWakeImage, &val, 
&len, &bootInfo->chameleonConfig))
                                
val="/private/var/vm/sleepimage";

                        // Do this first to be sure that root volume 
is mounted
                        ret = GetFileInfo(0, val, &flags, 
&sleeptime);

                        if ((bvr = getBootVolumeRef(val, &tmp)) 
== NULL)
                                break;

                        // Can't check if it was hibernation Wake=y 
is required
                        if (bvr->modTime == 0 && 
tryresumedefault)
                                break;

                        if ((ret != 0) || ((flags & 
kFileTypeMask) != kFileTypeFlat))
                                break;

                        if (!forceresume && 
((sleeptime+3)<bvr->modTime)) {
                                printf ("Hibernate image is too 
old by %d seconds. Use ForceWake=y to 
override\n",bvr->modTime-sleeptime);
                                break;
                        }

                        HibernateBoot((char *)val);
                        break;
                }

Comment 5 by Cosmosis Jones, Jul 28, 2011

so if ForceWake isn't set, it prints that message..

so really why do we have a time check? What isnt' considered to old?

Comment 6 by Cosmosis Jones, Jul 28, 2011

#if DEBUG    
				printf ("Hibernate image is too old by %d seconds. Use 
ForceWake=y to override\n",bvr->modTime-sleeptime);
#endif          

changed it to debug for now. i dont' see the point of adding another 
booter key.
Labels: Target:2.0 Target:2.1
Status: Fixed

Created: 12 years 8 months ago by Polish OX

Updated: 12 years 8 months ago

Status: Fixed

Owner: Cosmosis Jones

Followed by: 1 person

Labels:
Priority:Medium
Type:Enhancement
Target:2.0