Index: trunk/i386/libsaio/sys.c =================================================================== --- trunk/i386/libsaio/sys.c (revision 2605) +++ trunk/i386/libsaio/sys.c (revision 2606) @@ -78,6 +78,10 @@ #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; @@ -961,15 +965,18 @@ 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; @@ -1018,7 +1025,8 @@ } 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) @@ -1048,7 +1056,7 @@ // 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