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

--- Comment #3 from Andrey V. Elsukov <a...@freebsd.org> ---
(In reply to Mahmoud Al-Qudsi from comment #2)
> @Andrey I'm intimately familiar with geom and gpart. Please refer to the
> final section of my PR concerning suggested fix. As you say, gpart works on
> partitions only, so it is a mistake for it to assert that an object of the
> disk class does not exist. The problem is that the _partition_ specified on
> this disk is not a geom object, and the error message should reflect that.

No. There are no objects of type partitions. And gpart doesn't work with
objects of class DISK. When you issue `gpart create -t gpt da0`, da0 - is geom
provider, it is not an object of class PART. But when the command completes,
there will be geom object of class PART with the same name. This object has
some internal data, like how many partition it can have, which partitions it
has, how these partitions are called, i.e. what name they have "p", or "s", or
"a", or some other; and many other info. gpart(8) utility knows how obtain this
information from *object of class PART*. When you use gpart(8) utility with
geom objects of different classes, there are no such info. Since there are no
object with name da0 and class PART, gpart(8) can not assume that the name of
such object is da0p1, because it doesn't know what name should be used for
partition with index 1.

-- 
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