https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=229594

--- Comment #5 from Mahmoud Al-Qudsi <mqu...@neosmart.net> ---
I just realized that while gpart may not work on DISK objects, it *does* know
about their existence, at the very least. `gpart create -s mbr aoneuh` returns
an error while `gpart create -s mbr nvd0` (where `nvd0` is a valid DISK object
and not (yet) the name of a valid PART object) will succeed.

That means that when `gpart bootcode -b ... -p ... -i $N $DISK` is executed,
gpart _could_ distinguish between $DISK not existing at all (which the current
error message could be taken to assert universally) vs $DISK being a valid disk
but not a valid PART object.

My proposal is for the permutation of $N and $DISK to determine which of the
following messages is displayed:

* $DISK is not a valid disk
* $DISK is not partitioned for use with gpart
* $N is not a valid partition on $DISK (if $N is too big)

(text is obviously just a first stab at clarifying the situation and can use
refinement)

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
freebsd-geom@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-geom
To unsubscribe, send any mail to "freebsd-geom-unsubscr...@freebsd.org"

Reply via email to