* adfCreateHdFile * */
| 161 | * |
| 162 | */ |
| 163 | RETCODE 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 | /* |
nothing calls this directly
no test coverage detected