> if (bp->b_blkno + pi->p_offset
<= LABELSECTOR &&
> bp->b_blkno + pi->p_offset + sz > LABELSECTOR &&
> !(bp->b_flags & B_READ) && !(dk->dk_flags &
DKF_WLABEL))
So how do you write a label? Some ioctl?
Most likely. But for your purposes it is probably enough to just turn
on DKF_WLABEL, probably just another ioctl. At least, based on
BSD-derived code I have at ready hand (which uses DIOCSDINFO to write
the label and DIOCWLABEL to enable or disable what the above quote
calls DKF_WLABEL).
/~\ The ASCII Mouse
\ / Ribbon Campaign
X Against HTML mouse at
rodents-montreal.org
/ \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B