MCPcopy Create free account
hub / github.com/davidgiven/fluxengine / adfCreateHdFile

Function adfCreateHdFile

dep/adflib/src/adf_dump.c:163–186  ·  view source on GitHub ↗

* adfCreateHdFile * */

Source from the content-addressed store, hash-verified

161 *
162 */
163RETCODE adfCreateHdFile(struct Device* dev, char* volName, int volType)
164{
165
166 if (dev==NULL) {
167 (*adfEnv.eFct)("adfCreateHdFile : dev==NULL");
168 return RC_ERROR;
169 }
170 dev->volList =(struct Volume**) malloc(sizeof(struct Volume*));
171 if (!dev->volList) {
172 (*adfEnv.eFct)("adfCreateHdFile : unknown device type");
173 return RC_ERROR;
174 }
175
176 dev->volList[0] = adfCreateVol( dev, 0L, (int32_t)dev->cylinders, volName, volType );
177 if (dev->volList[0]==NULL) {
178 free(dev->volList);
179 return RC_ERROR;
180 }
181
182 dev->nVol = 1;
183 dev->devType = DEVTYPE_HARDFILE;
184
185 return RC_OK;
186}
187
188
189/*

Callers

nothing calls this directly

Calls 1

adfCreateVolFunction · 0.85

Tested by

no test coverage detected