xref: /haiku/src/apps/drivesetup/Support.h (revision 4b3b81da9e459443d75329cfd08bc9a57ad02653)
1 /*
2  * Copyright 2002-2007 Haiku Inc. All rights reserved.
3  * Distributed under the terms of the MIT license.
4  */
5 #ifndef SUPPORT_H
6 #define SUPPORT_H
7 
8 
9 #include <DiskDeviceDefs.h>
10 #include <HashMap.h>
11 #include <HashString.h>
12 
13 
14 class BPartition;
15 
16 
17 const char* string_for_size(off_t size, char *string);
18 
19 void dump_partition_info(const BPartition* partition);
20 
21 bool is_valid_partitionable_space(size_t size);
22 
23 
24 class SpaceIDMap : public HashMap<HashString, partition_id> {
25 public:
26 								SpaceIDMap();
27 	virtual						~SpaceIDMap();
28 
29 			partition_id		SpaceIDFor(partition_id parentID,
30 									off_t spaceOffset);
31 
32 private:
33 			partition_id		fNextSpaceID;
34 };
35 
36 
37 #endif // SUPPORT_H
38