38extern const char apaMBRMagic[];
41#ifdef APA_FORMAT_MAKE_PARTITIONS
43#ifndef APA_FORMAT_WIPE_COMMON_ONLY
44static const char *formatPartList[] = {
45 "__net",
"__system",
"__sysconf",
"__common", NULL};
49#ifdef APA_FORMAT_WIPE_COMMON_ONLY
50#define APA_WIPE_CHUNK_START (8 + 256)
52#define APA_WIPE_CHUNK_START 8
55#ifndef APA_8MB_PARTITION_SIZE
56#define APA_NUMBER_OF_SIZES 9
57static const char *sizeList[APA_NUMBER_OF_SIZES] = {
69#define APA_NUMBER_OF_SIZES 13
70static const char *sizeList[APA_NUMBER_OF_SIZES] = {
89static int fioPartitionSizeLookUp(
char *str);
90static int fioInputBreaker(
char const **arg,
char *outBuf,
int maxout);
94static void fioGetStatFiller(apa_cache_t *clink1,
iox_stat_t *stat);
97static int devctlSwapTemp(s32 device,
char *argp);
99static int fioPartitionSizeLookUp(
char *str)
103 for (i = 0; i < APA_NUMBER_OF_SIZES; i++) {
104 if (strcmp(str, sizeList[i]) == 0)
105#ifndef APA_8MB_PARTITION_SIZE
106 return (2 * 128 * 1024) << i;
108 return (2 * 8 * 1024) << i;
111 APA_PRINTF(APA_DRV_NAME
": Error: Invalid partition size, %s.\n", str);
115static int fioInputBreaker(
char const **arg,
char *outBuf,
int maxout)
120 if ((p = strchr(arg[0],
','))) {
121 if (maxout < (len = p - arg[0]))
123 memcpy(outBuf, arg[0], len);
125 while (arg[0][0] ==
' ')
129 if (maxout < (len = strlen(arg[0])))
131 memcpy(outBuf, arg[0], len);
142static int fioGetInput(
const char *arg,
apa_params_t *params)
146 static const struct apaFsType fsTypes[] = {
147#ifdef APA_SUPPORT_MBR
150 {
"EXT2SWAP", APA_TYPE_EXT2SWAP},
151 {
"EXT2", APA_TYPE_EXT2},
152 {
"REISER", APA_TYPE_REISER},
153 {
"PFS", APA_TYPE_PFS},
154 {
"CFS", APA_TYPE_CFS},
155#ifdef APA_SUPPORT_HDL
156 {
"HDL", APA_TYPE_HDL},
164 while (arg[0] ==
' ')
167 if (arg[0] == 0 || arg[0] ==
',')
169 if ((rv = fioInputBreaker(&arg, params->id, APA_IDMAX)) != 0)
174 if ((rv = fioInputBreaker(&arg, params->fpwd, APA_PASSMAX)) != 0)
177 if (params->fpwd[0] !=
'\0')
178 apaEncryptPassword(params->id, params->fpwd, params->fpwd);
183 if ((rv = fioInputBreaker(&arg, params->rpwd, APA_PASSMAX)) != 0)
186 if (params->rpwd[0] !=
'\0')
187 apaEncryptPassword(params->id, params->rpwd, params->rpwd);
192 memset(argBuf, 0,
sizeof(argBuf));
193 if ((rv = fioInputBreaker(&arg, argBuf,
sizeof(argBuf))) != 0)
196 if ((rv = fioPartitionSizeLookUp(argBuf)) < 0)
200 memset(argBuf, 0,
sizeof(argBuf));
201 if ((rv = fioInputBreaker(&arg, argBuf,
sizeof(argBuf))) != 0)
208 for (i = 0; (
unsigned int)i < (
sizeof(fsTypes))/(
sizeof(fsTypes[0])); i++) {
209 if (!strcmp(argBuf, fsTypes[i].desc)) {
210 params->type = fsTypes[i].type;
215 if ((
unsigned int)i == (
sizeof(fsTypes))/(
sizeof(fsTypes[0]))) {
216 APA_PRINTF(APA_DRV_NAME
": error: Invalid fstype, %s.\n", argBuf);
228 for (i = 0; i < apaMaxOpen; i++) {
229 if (hddFileSlots[i].f)
230 if ((hddFileSlots[i].f->unit == file->
unit) && (memcmp(hddFileSlots[i].
id, ¶ms->id, APA_IDMAX) == 0))
233 for (i = 0; i < apaMaxOpen; i++) {
234 if (!hddFileSlots[i].f) {
235 *fileSlot = &hddFileSlots[i];
250 if (fileSlot->post + size >= 0x1FF9)
251 size = 0x1FF8 - fileSlot->post;
257 if (blkIoDmaTransfer(f->unit, buf, fileSlot->post + fileSlot->parts[0].start + 8, size, mode))
261 fileSlot->post += size;
272 if (fileSlot->nsub < arg->
sub)
276 if (arg->
sub == 0 && (arg->sector < 0x2000))
279 if (arg->
sub != 0 && (arg->sector < 2))
282 if (fileSlot->parts[arg->
sub].length < arg->sector + arg->
size)
285 if (blkIoDmaTransfer(device, arg->buffer,
286 fileSlot->parts[arg->
sub].start + arg->sector, arg->
size, arg->
mode))
292int hddInit(iomanX_iop_device_t *f)
301 fioSema = CreateSema(&sema);
306int hddDeinit(iomanX_iop_device_t *f)
314int hddFormat(
iomanX_iop_file_t *f,
const char *dev,
const char *blockdev,
void *arg,
int arglen)
319#ifdef APA_FORMAT_MAKE_PARTITIONS
329#ifdef APA_SUPPORT_BHDD
330 if (strcmp(f->
device->name,
"bhdd") == 0)
334 if (f->
unit >= BLKIO_MAX_VOLUMES)
338 clink = apaCacheAlloc();
340 if (blkIoDmaTransfer(f->
unit, clink->header, APA_SECTOR_SECTOR_ERROR, 1, BLKIO_DIR_WRITE)) {
344 if (blkIoDmaTransfer(f->
unit, clink->header, APA_SECTOR_PART_ERROR, 1, BLKIO_DIR_WRITE)) {
351 for (i = 1024 * APA_WIPE_CHUNK_START; i < hddDevices[f->
unit].totalLBA; i += (1024 * 256)) {
358 if ((rv = apaJournalReset(f->
unit)) != 0)
361#ifndef APA_FORMAT_WIPE_COMMON_ONLY
363 if ((clink = apaCacheGetHeader(f->
unit, APA_SECTOR_MBR, APA_IO_MODE_WRITE, &rv))) {
366 header->magic = APA_MAGIC;
368 header->length = (1024 * 256);
371 strcpy(header->id,
"__mbr");
372#ifdef APA_FORMAT_LOCK_MBR
373 apaEncryptPassword(header->id, header->fpwd,
"sce_mbr");
374 apaEncryptPassword(header->id, header->rpwd,
"sce_mbr");
376 memcpy(header->mbr.magic, apaMBRMagic,
sizeof(header->mbr.magic));
378 header->mbr.version = APA_MBR_VERSION;
379 header->mbr.nsector = 0;
380 apaGetTime(&header->created);
381 apaGetTime(&header->mbr.created);
383#ifdef APA_SUPPORT_GPT
384 header->mbr.protective_mbr.UniqueMbrSignature = 0;
385 header->mbr.protective_mbr.Unknown = 0;
386 header->mbr.protective_mbr.partition_record1.BootIndicator = 0;
387 header->mbr.protective_mbr.partition_record1.StartHead = 0;
388 header->mbr.protective_mbr.partition_record1.StartSector = 2;
389 header->mbr.protective_mbr.partition_record1.StartTrack = 0;
390 header->mbr.protective_mbr.partition_record1.OSIndicator = 0xEE;
391 header->mbr.protective_mbr.partition_record1.EndHead = 0xFF;
392 header->mbr.protective_mbr.partition_record1.EndSector = 0xFF;
393 header->mbr.protective_mbr.partition_record1.EndTrack = 0xFF;
394 header->mbr.protective_mbr.partition_record1.StartingLBA = 1;
395 header->mbr.protective_mbr.partition_record1.SizeInLBA = hddDevices[f->
unit].totalLBA - header->mbr.protective_mbr.partition_record1.StartingLBA;
396 header->mbr.protective_mbr.Signature = 0xAA55;
399 header->checksum = apaCheckSum(header, 1);
400 clink->flags |= APA_CACHE_FLAG_DIRTY;
401 apaCacheFlushDirty(clink);
402 blkIoFlushCache(f->
unit);
404 hddDevices[f->
unit].status = 0;
405 hddDevices[f->
unit].format = APA_MBR_VERSION;
409#ifdef APA_FORMAT_MAKE_PARTITIONS
410 memset(&emptyBlocks, 0,
sizeof(emptyBlocks));
412 params.size = (1024 * 256);
413 params.type = APA_TYPE_PFS;
418#ifdef APA_FORMAT_WIPE_COMMON_ONLY
419 memset(params.id, 0,
sizeof(params.id));
420 strcpy(params.id,
"__sysconf");
421 if ( !(clink = apaFindPartition(f->
unit, params.id, &rv)) )
424 memset(params.id, 0, APA_IDMAX);
425 strcpy(params.id,
"__common");
426 if ( !hddAddPartitionHere(f->
unit, ¶ms, emptyBlocks, clink->sector, &rv) )
429 for (i = 0; formatPartList[i]; i++) {
430 memset(params.id, 0, APA_IDMAX);
431 strcpy(params.id, formatPartList[i]);
432 if (!(clink = hddAddPartitionHere(f->
unit, ¶ms, emptyBlocks, i ? clink->sector : 0, &rv)))
437 if (hddDevices[f->
unit].partitionMaxSize < params.size)
438 params.size = hddDevices[f->
unit].partitionMaxSize;
453#ifdef APA_SUPPORT_BHDD
455 if (strcmp(params->id,
"__xcontents") == 0 || strcmp(params->id,
"__extend") == 0 || strcmp(params->id,
"__xdata") == 0)
456 sector = hddDevices[device].totalLBA;
460 clink = apaCacheGetHeader(device, sector, APA_IO_MODE_READ, &rv);
461 memset(&emptyBlocks, 0,
sizeof(emptyBlocks));
463 sector = clink->sector;
465 if (memcmp(clink->header->id, params->id, APA_IDMAX) == 0)
468 apaAddEmptyBlock(clink->header, emptyBlocks);
469 clink = apaGetNextHeader(clink, &rv);
476 if (clink == NULL && (mode & FIO_O_CREAT)) {
477 if ((rv = hddCheckPartitionMax(device, params->size)) >= 0) {
478 if ((clink = hddAddPartitionHere(device, params, emptyBlocks, sector, &rv)) != NULL) {
479 sector = clink->header->start;
480 clink2 = apaCacheAlloc();
482 blkIoDmaTransfer(device, clink2->header, sector + 8, 2, BLKIO_DIR_WRITE);
483 blkIoDmaTransfer(device, clink2->header, sector + 0x2000, 2, BLKIO_DIR_WRITE);
484 apaCacheFree(clink2);
490 fileSlot->parts[0].start = clink->header->start;
491 fileSlot->parts[0].length = clink->header->length;
493 fileSlot->type = clink->header->type;
494 fileSlot->nsub = clink->header->nsub;
495 memcpy(&fileSlot->id, &clink->header->id, APA_IDMAX);
497 if (apaPassCmp(clink->header->fpwd, params->fpwd) != 0) {
498 rv = (!(mode & FIO_O_WRONLY)) ? apaPassCmp(clink->header->rpwd, params->rpwd) : -
EACCES;
505static int apaRemove(s32 device,
const char *
id,
const char *fpwd)
511 for (i = 0; i < apaMaxOpen; i++)
513 if (hddFileSlots[i].f != 0) {
514 if (memcmp(hddFileSlots[i].
id,
id, APA_IDMAX) == 0)
518#ifndef APA_ALLOW_REMOVE_PARTITION_WITH_LEADING_UNDERSCORE
519 if (
id[0] ==
'_' &&
id[1] ==
'_')
522 if ((clink = apaFindPartition(device,
id, &rv)) == NULL)
524 if (apaPassCmp(clink->header->fpwd, fpwd)) {
529 nsub = clink->header->nsub;
530 clink->header->nsub = 0;
531 clink->flags |= APA_CACHE_FLAG_DIRTY;
532 apaCacheFlushAllDirty(device);
533 for (i = nsub - 1; i != -1; i--) {
536 if ((clink2 = apaCacheGetHeader(device, clink->header->subs[i].start, APA_IO_MODE_READ, &rv))) {
537 if ((rv = apaDelete(clink2))) {
544 return apaDelete(clink);
551static int apaRename(s32 device,
const char *oldId,
const char *newId)
557 if ((clink = apaFindPartition(device, newId, &rv)) != NULL) {
564 for (i = 0; i < apaMaxOpen; i++) {
565 if (hddFileSlots[i].f != NULL) {
566 if (memcmp(hddFileSlots[i].
id, oldId, APA_IDMAX) == 0) {
574#ifndef APA_ALLOW_REMOVE_PARTITION_WITH_LEADING_UNDERSCORE
575 if (oldId[0] ==
'_' && oldId[1] ==
'_')
580 if ((clink = apaFindPartition(device, oldId, &rv)) == NULL) {
586 memset(clink->header->id, 0, APA_IDMAX);
587 strncpy(clink->header->id, newId, APA_IDMAX - 1);
590 apaGetTime(&clink->header->created);
591 clink->header->checksum = apaCheckSum(clink->header, 1);
593 clink->flags |= APA_CACHE_FLAG_DIRTY;
595 apaCacheFlushAllDirty(device);
606 if ((rv = fioGetInput(name, ¶ms)) < 0)
608#ifdef APA_SUPPORT_BHDD
609 if (strcmp(f->
device->name,
"bhdd") == 0)
613 rv = apaRemove(f->
unit, params.id, params.fpwd);
627 if (f->
unit >= BLKIO_MAX_VOLUMES || hddDevices[f->
unit].status != 0)
630#ifdef APA_SUPPORT_BHDD
631 if (strcmp(f->
device->name,
"bhdd") == 0)
632 if ((flags & FIO_O_CREAT) != 0)
636 if (!(f->
mode & FIO_O_DIROPEN))
637 if ((rv = fioGetInput(name, ¶ms)) < 0)
641 if ((rv = getFileSlot(¶ms, &fileSlot, f)) == 0) {
642 if (!(f->
mode & FIO_O_DIROPEN)) {
643 if ((rv = apaOpen(f->
unit, fileSlot, ¶ms, flags)) == 0) {
648#ifdef APA_SUPPORT_BHDD
649 if (strcmp(f->
device->name,
"bhdd") == 0) {
650 fileSlot->parts[0].start = hddDevices[f->
unit].totalLBA;
652 fileSlot->parts[0].start = 0;
673 return fioDataTransfer(f, buf, size, BLKIO_DIR_READ);
678 if (!(f->
mode & FIO_O_WRONLY))
680#ifdef APA_SUPPORT_BHDD
681 if (strcmp(f->
device->name,
"bhdd") == 0)
684 return fioDataTransfer(f, buf, size, BLKIO_DIR_WRITE);
693 if (whence == FIO_SEEK_END)
702 if (whence == FIO_SEEK_CUR) {
703 if (((
int)fileSlot->post + post) < 0 || (fileSlot->post + post) >= 0x1FF9)
706 fileSlot->post += post;
707 rv = fileSlot->post << 9;
709 }
else if (whence == FIO_SEEK_SET) {
710 if (post < 0 || post >= 0x1FF9)
713 fileSlot->post = post;
714 rv = fileSlot->post << 9;
721static void fioGetStatFiller(apa_cache_t *clink,
iox_stat_t *stat)
723 stat->mode = clink->header->type;
724 stat->attr = clink->header->flags;
726 stat->size = clink->header->length;
727 memcpy(&stat->ctime, &clink->header->created,
sizeof(
apa_ps2time_t));
728 memcpy(&stat->atime, &clink->header->created,
sizeof(
apa_ps2time_t));
729 memcpy(&stat->mtime, &clink->header->created,
sizeof(
apa_ps2time_t));
737 u64 totalsize = (u64)clink->header->length;
738 for (
int i = 0; i < clink->header->nsub; i++) {
739 totalsize += (u64)clink->header->subs[i].length;
741 stat->private_1 = (u32)(totalsize & 0xFFFFFFFF);
742 stat->private_2 = (u32)(totalsize >> 32);
746#ifndef APA_STAT_RETURN_PART_LBA
759 if ((rv = fioGetInput(name, ¶ms)) < 0)
763 if ((clink = apaFindPartition(f->
unit, params.id, &rv))) {
764 if ((rv = apaPassCmp(clink->header->fpwd, params.fpwd)) == 0 || (rv = apaPassCmp(clink->header->rpwd, params.rpwd)) == 0)
765 fioGetStatFiller(clink, stat);
774 return hddOpen(f, name, 0, 0);
783 if (!(f->
mode & FIO_O_DIROPEN))
786 if (fileSlot->parts[0].start == (u32)(-1))
790 if ((clink = apaCacheGetHeader(f->
unit, fileSlot->parts[0].start, APA_IO_MODE_READ, &rv)) &&
791 clink->header->length) {
794 apa_cache_t *cmain = apaCacheGetHeader(f->
unit, clink->header->main, APA_IO_MODE_READ, &rv);
799 strncpy(dirent->name, cmain->header->id, APA_IDMAX);
800 dirent->name[APA_IDMAX] =
'\0';
801 rv = strlen(dirent->name);
809 strncpy(dirent->name, clink->header->id, APA_IDMAX);
810 dirent->name[APA_IDMAX] =
'\0';
811 rv = strlen(dirent->name);
813 fioGetStatFiller(clink, &dirent->stat);
814 if (clink->header->next == 0)
815 fileSlot->parts[0].start = -1;
817 fileSlot->parts[0].start = clink->header->next;
831 rv = apaRename(f->
unit, oldname, newname);
840 u32 device = fileSlot->f->
unit;
847 if (!(fileSlot->f->
mode & FIO_O_WRONLY))
855 if ((rv = fioPartitionSizeLookUp(argp)) < 0)
860 params.type = fileSlot->type;
861 params.main = fileSlot->parts[0].start;
862 params.number = fileSlot->nsub + 1;
863 if ((rv = hddCheckPartitionMax(device, params.size)) < 0)
867 memset(&emptyBlocks, 0,
sizeof(emptyBlocks));
868 clink = apaCacheGetHeader(device, APA_SECTOR_MBR, APA_IO_MODE_READ, &rv);
870 sector = clink->sector;
871 apaAddEmptyBlock(clink->header, emptyBlocks);
872 clink = apaGetNextHeader(clink, &rv);
877 if (!(clink = hddAddPartitionHere(device, ¶ms, emptyBlocks, sector, &rv)))
880 sector = clink->header->start;
881 length = clink->header->length;
883 if (!(clink = apaCacheGetHeader(device, fileSlot->parts[0].start, APA_IO_MODE_READ, &rv)))
886 clink->header->subs[clink->header->nsub].start = sector;
887 clink->header->subs[clink->header->nsub].length = length;
888 clink->header->nsub++;
890 fileSlot->parts[fileSlot->nsub].start = sector;
891 fileSlot->parts[fileSlot->nsub].length = length;
892 clink->flags |= APA_CACHE_FLAG_DIRTY;
893 apaCacheFlushAllDirty(device);
901 u32 device = fileSlot->f->
unit;
902 apa_cache_t *mainPart;
903 apa_cache_t *subPart;
905 if (!(fileSlot->f->
mode & FIO_O_WRONLY))
908 if (fileSlot->nsub == 0)
911 if (!(mainPart = apaCacheGetHeader(device, fileSlot->parts[0].start, APA_IO_MODE_READ, &rv)))
914 if ((subPart = apaCacheGetHeader(device,
915 mainPart->header->subs[mainPart->header->nsub - 1].start, APA_IO_MODE_READ, &rv))) {
917 mainPart->header->nsub--;
918 mainPart->flags |= APA_CACHE_FLAG_DIRTY;
919 apaCacheFlushAllDirty(device);
920 rv = apaDelete(subPart);
922 apaCacheFree(mainPart);
927 void *bufp,
unsigned int buflen)
936#ifdef APA_SUPPORT_BHDD
937 if (strcmp(f->
device->name,
"bhdd") == 0) {
954 rv = ioctl2AddSub(fileSlot, (
char *)argp);
958 rv = ioctl2DeleteLastSub(fileSlot);
966 blkIoFlushCache(f->
unit);
971 rv = ioctl2Transfer(f->
unit, fileSlot, argp);
975 rv = fileSlot->parts[*(u32 *)argp].length;
979 apaSetPartErrorSector(f->
unit, fileSlot->parts[0].start);
984 if ((rv = apaGetPartErrorSector(f->
unit, APA_SECTOR_PART_ERROR, &err_lba)) > 0) {
985 if (err_lba == fileSlot->parts[0].start) {
987 apaSetPartErrorSector(f->
unit, 0);
992#ifdef APA_SUPPORT_IOCTL_GETPARTSTART
994 case HIOCGETPARTSTART:
995 rv = fileSlot->parts[*(u32 *)argp].start;
1003 SignalSema(fioSema);
1007static int devctlSwapTemp(s32 device,
char *argp)
1011 char szBuf[APA_IDMAX];
1012 apa_cache_t *partTemp;
1013 apa_cache_t *partNew;
1016 if ((rv = fioGetInput(argp, ¶ms)) < 0)
1019 if (params.id[0] ==
'_' && params.id[1] ==
'_')
1022 memset(szBuf, 0, APA_IDMAX);
1023 strcpy(szBuf,
"_tmp");
1024 if (!(partTemp = apaFindPartition(device, szBuf, &rv)))
1027 if ((partNew = apaFindPartition(device, params.id, &rv))) {
1028 if ((rv = apaPassCmp(partNew->header->fpwd, params.fpwd)) == 0) {
1029 memcpy(partTemp->header->id, partNew->header->id, APA_IDMAX);
1030 memcpy(partTemp->header->rpwd, partNew->header->rpwd, APA_PASSMAX);
1031 memcpy(partTemp->header->fpwd, partNew->header->fpwd, APA_PASSMAX);
1033 memset(partNew->header->id, 0, APA_IDMAX);
1034 strcpy(partNew->header->id,
"_tmp");
1035 memset(partNew->header->rpwd, 0, APA_PASSMAX);
1036 memset(partNew->header->fpwd, 0, APA_PASSMAX);
1037 partTemp->flags |= APA_CACHE_FLAG_DIRTY;
1038 partNew->flags |= APA_CACHE_FLAG_DIRTY;
1039 apaCacheFlushAllDirty(device);
1041 apaCacheFree(partNew);
1043 apaCacheFree(partTemp);
1052 if (!(clink = apaCacheGetHeader(device, APA_SECTOR_MBR, APA_IO_MODE_READ, &rv)))
1055 APA_PRINTF(APA_DRV_NAME
": mbr start: %ld\n" APA_DRV_NAME
": mbr size : %ld\n", mbrInfo->start, mbrInfo->size);
1056#ifdef APA_SUPPORT_GPT
1058 if (mbrInfo->start < APA_SECTOR_MIN_OSDSTART)
1061 clink->header->mbr.osdStart = mbrInfo->start;
1062 clink->header->mbr.osdSize = mbrInfo->size;
1063 clink->flags |= APA_CACHE_FLAG_DIRTY;
1064 apaCacheFlushAllDirty(device);
1065 apaCacheFree(clink);
1070 unsigned int arglen,
void *bufp,
unsigned int buflen)
1078#ifdef APA_SUPPORT_BHDD
1079 if (strcmp(f->
device->name,
"bhdd") == 0)
1091 blkIoSmartSaveAttr(f->
unit);
1096 rv = blkIoIdle(f->
unit, *(
char *)arg);
1100 rv = hddDevices[f->
unit].partitionMaxSize;
1104 rv = hddDevices[f->
unit].totalLBA;
1108 if (blkIoFlushCache(f->
unit))
1113 rv = devctlSwapTemp(f->
unit, (
char *)arg);
1116 case HDIOC_SMARTSTAT:
1117 rv = blkIoSmartReturnStatus(f->
unit);
1121 rv = hddDevices[f->
unit].status;
1124 case HDIOC_FORMATVER:
1125 rv = hddDevices[f->
unit].format;
1129 rv = apaGetFreeSectors(f->
unit, bufp, hddDevices);
1133 rv = blkIoIdleImmediate(f->
unit);
1145 case HDIOC_GETSECTORERROR:
1146 rv = apaGetPartErrorSector(f->
unit, APA_SECTOR_SECTOR_ERROR, 0);
1150 rv = apaGetPartErrorName(f->
unit, (
char *)bufp);
1165 rv = blkIoGetSceId(f->
unit, (u16 *)bufp);
1181 SignalSema(fioSema);
1186#ifdef APA_USE_IOMANX
1187int hddMount(
iomanX_iop_file_t *f,
const char *fsname,
const char *devname,
int flag,
void *arg,
int arglen)
1195#ifdef APA_SUPPORT_BHDD
1196 if (strcmp(f->
device->name,
"bhdd") == 0)
1201 rv = hdd_blkio_vhdd_mount(f->
unit, devname);
1202 SignalSema(fioSema);
1213#ifdef APA_SUPPORT_BHDD
1214 if (strcmp(f->
device->name,
"bhdd") == 0)
1219 rv = hdd_blkio_vhdd_umount(f->
unit);
1220 SignalSema(fioSema);
#define HDIOC_TOTALSECTOR
#define HDIOC_WRITESECTOR
#define HDIOC_SCEIDENTIFY
#define HDIOC_GETERRORPARTNAME
struct _iomanX_iop_file iomanX_iop_file_t
struct _iomanX_iop_device * device