#define DBG(x...)␉msglog(x)␊ |
#endif␊ |
␊ |
#ifndef DEBUG_FEATURE_LAST_BOOT␊ |
#define DEBUG_FEATURE_LAST_BOOT 0 // AllocateKernelMemory error with feature from 2562␊ |
#endif␊ |
␊ |
extern int multiboot_partition;␊ |
extern int multiboot_partition_set;␊ |
extern int multiboot_skip_partition;␊ |
|
␉BVRef bvr1␉␉= NULL;␊ |
␉BVRef bvr2␉␉= NULL;␊ |
␊ |
//␉char dirSpec[]␉␉= "hd(%d,%d)/";␊ |
//␉char fileSpec[]␉␉= "Volumes";␊ |
#if DEBUG_FEATURE_LAST_BOOT␊ |
␉char dirSpec[]␉␉= "hd(%d,%d)/";␊ |
␉char fileSpec[]␉␉= "Volumes";␊ |
#endif␊ |
␉char *label;␊ |
#if DEBUG_FEATURE_LAST_BOOT␊ |
␉u_int32_t time;␊ |
␉u_int32_t lasttime␉= 0;␊ |
␊ |
//␉u_int32_t time;␊ |
//␉u_int32_t lasttime␉= 0;␊ |
␉long flags;␊ |
#endif␊ |
␊ |
//␉long flags;␊ |
␉␊ |
␉if (chain->filtered)␊ |
␉{␊ |
␉␉filteredChain = true;␊ |
|
␉␉}␊ |
␉␉free(val);␊ |
␉}␊ |
/*␊ |
␊ |
#if DEBUG_FEATURE_LAST_BOOT // the above code cause "AllocateKernelMemory error"␊ |
␉// Bungo: select last booted partition as the boot volume␊ |
␉// TODO: support other OSes (foreign boot)␊ |
␉for (bvr = chain; bvr; bvr = bvr->next)␊ |
|
␉// Bungo: code below selects first partition in the chain (last partition on disk),␊ |
␉// in my case Recovery HD, as boot volume, so I would prefer last booted partition␊ |
␉// as default boot volume - see the code above␊ |
*/␊ |
#endif␊ |
␊ |
␉/*␊ |
␉ * Scannig the volume chain backwards and trying to find␊ |