1/* 2 * Copyright (c) 2007 Apple Inc. All rights reserved. 3 * 4 * @APPLE_LICENSE_HEADER_START@ 5 * 6 * This file contains Original Code and/or Modifications of Original Code 7 * as defined in and that are subject to the Apple Public Source License 8 * Version 2.0 (the 'License'). You may not use this file except in 9 * compliance with the License. Please obtain a copy of the License at 10 * http://www.opensource.apple.com/apsl/ and read it before using this 11 * file. 12 * 13 * The Original Code and all software distributed under the License are 14 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 15 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 16 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 17 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 18 * Please see the License for the specific language governing rights and 19 * limitations under the License. 20 * 21 * @APPLE_LICENSE_HEADER_END@ 22 */ 23/* 24 * FILE: bootroot_internal.h 25 * AUTH: Soren Spies (sspies) 26 * DATE: 8 June 2006 (as update_boot.h) 27 * DESC: routines for implementing 'kextcache -u' functionality (4252674) 28 * in which bootcaches.plist files get copied to any Apple_Boots 29 */ 30 31#ifndef _BOOTROOT_INTERNAL_H_ 32#define _BOOTROOT_INTERNAL_H_ 33 34#include <CoreFoundation/CoreFoundation.h> 35 36#include "bootroot.h" 37 38// internal options for "update" operations (BROptsNone #def'd in bootroot.h) 39typedef enum { 40 // this first one is orthogonal to the others :P 41 kBRUForceUpdateHelpers = 0x1, // ignore bootstamps, update helpers 42 43 kBRUCachesOnly = 0x2, // only update caches, not helpers 44 kBRUHelpersOptional = 0x4, // ignore helper update failures 45 kBRUExpectUpToDate = 0x8, // successful updates -> EX_OSFILE 46 47 // kBRAnyBootStamps #def'd to 0x10000 in bootroot.h 48} BRUpdateOpts_t; 49 50 51// in update_boot.c 52 53/* 54 * Update all caches and any helper partitions (kextcache -u). 55 * Except when kForceUpdateHelpers is specified, unrecognized 56 * bootcaches.plist causes immediate success. 57 */ 58int checkUpdateCachesAndBoots(CFURLRef volumeURL, BRUpdateOpts_t flags); 59 60// "put" and "take" let routines decide if a lock is needed (e.g. if no kextd) 61// only used by volume lockers (kextcache, libBootRoot clients, !kextd) 62int takeVolumeForPath(const char *volPath); 63int putVolumeForPath(const char *path, int status); 64 65#endif // _BOOTROOT_INTERNAL_H_ 66