tech-userlevel archive

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

Re: newfs_udf(8) and wedges



In article <20150704070546.GA995%polynum.com@localhost>,  <tlaronde%polynum.com@localhost> wrote:
>Context: in a previous thread, I had suggested that UDF was a way to
>share a filesystem (in my case via an USB connected disk---umass) with,
>at least Windows (probably works with Mac too and others, due to the
>nature of UDF, but haven't tested).
>
>The trick is to use a GPT header with a sole UDF partition (but,
>apparently, from tests, the partition has to start at offset 2048 
>_sectors_ for Windows).
>
>I had GPT'ed and formatted under Windows and NetBSD was able to read
>using mount_udf(8) and the wedge.
>
>The remaining has been attempted on 6.1.5.
>
>I tried the reverse: setting everything on NetBSD, but it fails:
>
>1) If I can create a GPT (need to force and possibly even to destroy
>first to have sensible results) and then add a partition, I was then
>unable to dkctl(8) addwedge: I needed to disconnect the disk and
>reconnect so that the automatic wedge creation happens ;
>
>2) newfs_udf(8) is using DIOCGDINFO and DISKPART that is relies AFAIU on
>disklabel and is unable to deal with wedges. Trying to fake a disklabel
>as a workaround lead to disaster.
>
>Is there somewhere documentation or a code canonical example to update
>an utility for wedge support?

Look at the newfs (the src/sbin/newfs) code. I think that the parts
where we open a disk or file depending on the F flag and where we
get the disk geometry information can be factored out for each of
the newfs programs.

christos



Home | Main Index | Thread Index | Old Index