mkdir and rtems_mkdir

Chan Kim ckim at etri.re.kr
Thu Jul 9 07:25:05 UTC 2015


> See documentation of rtems_fsmount(), it performs the second mount only
> if the first failed.
Oh, Thanks. I didnt' check that function.
The document shows an example using rtems_bdpart_register_from_disk function and I realized that I should switch to using this function instead of rtems_ide_partition_initialize function from the example(the link).
Chan



보낸 사람 : "Sebastian Huber" <sebastian.huber at embedded-brains.de>
보낸 날짜 : 2015-07-09 16:09:47 ( +09:00 )
받는 사람 : users at rtems.org <users at rtems.org>
참조 : 
제목 : Re: mkdir and rtems_mkdir

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.
> https://github.com/SayCV/rtems-example-sparc-leon/blob/master/rtems-spi-sdcard.c
> 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 rtems.org
> http://lists.rtems.org/mailman/listinfo/users

-- 
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 embedded-brains.de
PGP : Public key available on request.

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

_______________________________________________
users mailing list
users at rtems.org
http://lists.rtems.org/mailman/listinfo/users


More information about the users mailing list