# fat\_AutoMount() failed with return code -38

**URL:** <https://forums.digi.com/t/fat-automount-failed-with-return-code-38/10855>\
**Category:** Rabbit\
**Created:** [April 17, 2012, 4:35pm UTC](https://forums.digi.com/t/fat-automount-failed-with-return-code-38/10855 "2012-04-17T16:35:59Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![vitnekula](https://avatars.discourse-cdn.com/v4/letter/v/bbce88/32.png) [@vitnekula](https://forums.digi.com/u/vitnekula)\
**Post date:** [April 17, 2012, 4:35pm UTC](https://forums.digi.com/t/fat-automount-failed-with-return-code-38/10855/1 "2012-04-17T16:35:59Z")

</div>

I have kit RCM5450W. When I Mount EEPROM with function fat\_AutoMount() his return value is -38. This value is’nt specified in datasheet.  
Example code is here:

temp = fat\_AutoMount(FDDF\_USE\_DEFAULT);

first\_part = NULL;  
for (i = 0; i \< num\_fat\_devices \* FAT\_MAX\_PARTITIONS; ++i) {  
if ((first\_part = fat\_part\_mounted[i]) != NULL) {  
break;  
}  
}

```
if (first_part == NULL) {
	temp = (temp &lt; 0) ? temp : -ENOPART;
} else {
	printf("FAT was succeeded mount

```

");  
temp = 0;  
}

```
if (temp &lt; 0) {
if (temp == -EUNFORMAT)
  	printf("Device not Formatted, Please run Fmt_Device.c

```

");  
else if(temp == -EBADPART)  
printf("FAT failed! Partition is not a valid FAT partition  
");  
else if(temp == -EIO)  
printf("FAT failed! Device I/O error  
");  
else if(temp == -EINVAL)  
printf("FAT failed! Invalid prtTable  
");  
else if(temp == -ENOPART)  
printf("FAT failed! No partitions exist on the device  
");  
else if(temp == -EBUSY)  
printf("FAT failed! For non-blocking mode only, the device is busy  
");

```
  exit(1);

```

}

Where is the problem???

Thank you very much!
