tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: mounting wedges by name



In article <i9elds$r89$1%serpens.de@localhost>,
Michael van Elst <mlelstv%serpens.de@localhost> wrote:
>The wedge driver dk(4) provides a method to access disk partitions
>different from the traditional /dev/DNP for partion P on instance N
>of driver D. One issue with wedges is that the device nodes /dev/dkN
>are more volatile. A specific instance N of the driver doesn't
>necessarily refer to a specific partition and creating a new
>partitition may renumber all your devices.
>
>Wedges however have names. The driver uses a UUID as the default
>name of a partition, but can also provide arbitrary Unicode strings
>(e.g. from a GPT label).
>
>http://ftp.netbsd.org/pub/NetBSD/misc/mlelstv/mount.diff is a patch
>to mount(8) that allows you to mount a partition by using the syntax
>"NAME=string" as the special file where 'string' is the Unicode name
>of the wedge. The same syntax can be used in fstab.
>
>Comments?

Looks good:

- you could make the mib array static const.
- there are some missing spaces after commas.
- I prefer to write the strtok loops:
        for (p = strtok(array, " "); p; p = strtok(NULL, " "))
- I think you really need to use iconv instead of casting the utf8 and using
  strcmp.

christos



Home | Main Index | Thread Index | Old Index