Date: Sun, 08 Jul 2018 19:59:15 +0000 From: bugzilla-noreply@freebsd.org To: geom@FreeBSD.org Subject: [Bug 229594] Incorrect "No such geom" error when executing gpart with invalid or incorrect gpt partition number Message-ID: <bug-229594-14739-W0i6dW2urr@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-229594-14739@https.bugs.freebsd.org/bugzilla/> References: <bug-229594-14739@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D229594 --- Comment #3 from Andrey V. Elsukov <ae@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 g= eom 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. --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-229594-14739-W0i6dW2urr>
