[En-Nut-Discussion] Retrieve a partition label

Mathieu SOULARD kazh29 at gmail.com
Sun Jan 10 12:32:53 CET 2010


I would like to get the volume label of the inserted SD card partition. I
had explored a little the API and some source files of Nut/OS and I didn't
found anything about that.

In my opinion, the label name could be retrieved from the function
PathVolMount which already retrieves information from the boot sector where
the volume label is available.

It could be possible to extend the structure PATHVOL with a new char array
field with a length of 11+1 bytes where the volume label could be copied at
mount operation.

* I would like to know your opinion about that update *

I would like to try it, but I'm confused about the way to retrieve this
information in my application from the device ID I get when I call

Maybe something like that:

NUTFILE *fp = (NUTFILE *) ((uintptr_t) ID);
vol = (PHATVOL *) fp->nf_dev->dev_dcb;

But it does not seem to be the nice way...

* Does someone could help me to understand the way to retrieve the PATHVOL
structure associated to the MMC device ? *



More information about the En-Nut-Discussion mailing list