mkdir and rtems_mkdir

Sebastian Huber sebastian.huber at
Thu Jul 9 07:09:37 UTC 2015

See documentation of rtems_fsmount(), it performs the second mount only 
if the first failed.

On 09/07/15 09:03, Chan Kim wrote:
> Hi,
> I am trying to mount an SD card and I found this link below useful.
> I've read master boot record successfully. According to the C source, logical partition seems to have been created.
> Now it tries to mount the device.(disk and parition separtately, a question at the end)
> This program first uses int mkdir(  const char *pathname, mode_t      mode) to make directory
> and then calls rtems_fsmount(  const rtems_fstab_entry *fstab_ptr, size_t fstab_count, size_t *fail_idx) to mount the disk.
> But inside rtems_fsmount, it creates mount point again using rtems_mkdir(const char *path, mode_t mode).
> I will follow the rtems_fsmount function, but why does it make "/mnt" twice? Shouldn't I remove first mkdir(..) call?
> and I don't know why the mount point is the same "/mnt" for mounting two devices. (sd-card-card-a1 and sd-card-a).
> Am I supposed to see the first partition under /mnt? and why does it mount disk? (in linux, I understand we mount only partition, not disk).
> By the way, I'm using rtems4.10.99.
> Thanks in advance.
> Chan
> _______________________________________________
> users mailing list
> users at

Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  : sebastian.huber at
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.

More information about the users mailing list