1 /* 2 * Copyright 2007, Ingo Weinhold, ingo_weinhold@gmx.de. 3 * Distributed under the terms of the MIT License. 4 */ 5 6 #include "CreateChildJob.h" 7 8 #include "DiskDeviceUtils.h" 9 #include "PartitionReference.h" 10 11 12 // constructor 13 CreateChildJob::CreateChildJob(PartitionReference* partition, 14 PartitionReference* child) 15 : DiskDeviceJob(partition, child), 16 fOffset(0), 17 fSize(0), 18 fType(NULL), 19 fName(NULL), 20 fParameters(NULL) 21 { 22 } 23 24 25 // destructor 26 CreateChildJob::~CreateChildJob() 27 { 28 free(fType); 29 free(fName); 30 free(fParameters); 31 } 32 33 34 // Init 35 status_t 36 CreateChildJob::Init(off_t offset, off_t size, const char* type, 37 const char* name, const char* parameters) 38 { 39 fOffset = offset; 40 fSize = size; 41 42 SET_STRING_RETURN_ON_ERROR(fType, type); 43 SET_STRING_RETURN_ON_ERROR(fName, name); 44 SET_STRING_RETURN_ON_ERROR(fParameters, parameters); 45 46 return B_OK; 47 } 48 49 50 // Do 51 status_t 52 CreateChildJob::Do() 53 { 54 // Implement! 55 return B_BAD_VALUE; 56 } 57 58