Re: no /sbin/gpt on 8.0-BETA2

From: Andrey V. Elsukov <bu7cher_at_yandex.ru>
Date: Wed, 26 Aug 2009 21:17:39 +0400
Oliver Lehmann wrote:
> Are you sure it is the same error? Why is it working with a full path
> when working with a gmirror object?
> 
> # gpart add -b 1572864 -s 262144 -t freebsd-swap -i 2 /dev/mirror/gm0s1
> mirror/gm0s1b added
> 
> Why isn't it segfaulting here?
> I already opend a PR...
> 
> http://www.freebsd.org/cgi/query-pr.cgi?pr=138065

Can you try BETA3 with attached patch?

-- 
WBR, Andrey V. Elsukov

Index: geom_part.c
===================================================================
--- sbin/geom/class/part/geom_part.c	(revision 196511)
+++ sbin/geom/class/part/geom_part.c	(working copy)
_at__at_ -153,6 +153,9 _at__at_
 {
 	struct ggeom *gp;
 
+	if (strncmp(name, _PATH_DEV, strlen(_PATH_DEV)) == 0)
+		name += strlen(_PATH_DEV);
+
 	LIST_FOREACH(gp, &classp->lg_geom, lg_geom) {
 		if (strcmp(gp->lg_name, name) == 0)
 			return (gp);
Received on Wed Aug 26 2009 - 15:17:48 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:54 UTC