Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 28 Jun 2010 15:35:08 +0400
From:      "Andrey V. Elsukov" <bu7cher@yandex.ru>
To:        Pawel Jakub Dawidek <pjd@FreeBSD.org>
Cc:        freebsd-geom@FreeBSD.org, Garrett Cooper <gcooper@FreeBSD.org>
Subject:   Re: bin/144521: geom(1) tool parsing non-subclass command broken
Message-ID:  <4C2888EC.8030103@yandex.ru>
In-Reply-To: <20100628091014.GB7123@garage.freebsd.pl>
References:  <201006280650.o5S6o24A036420@freefall.freebsd.org> <20100628091014.GB7123@garage.freebsd.pl>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enig5AEC92BB62BABAD0BA2C3629
Content-Type: multipart/mixed; boundary="------------000700020102080200020605"

This is a multi-part message in MIME format.
--------------000700020102080200020605
Content-Type: text/plain; charset=KOI8-R
Content-Transfer-Encoding: quoted-printable

On 28.06.2010 13:10, Pawel Jakub Dawidek wrote:
> The 'load' command might be unavailable for two main reasons:
> 1. GEOM_LABEL class is already loaded or is part of the kernel.

Hi, Pawel

What you think about attached patch?

--=20
WBR, Andrey V. Elsukov

--------------000700020102080200020605
Content-Type: text/plain;
 name="geom_load.diff"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
 filename="geom_load.diff"

Index: geom.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- geom.c	(revision 209568)
+++ geom.c	(working copy)
@@ -991,7 +991,7 @@ std_load_available(void)
 	 * If already in kernel, "load" command is not available.
 	 */
 	if (modfind(name) >=3D 0)
-		return (0);
+		errx(EXIT_FAILURE, "Module is already loaded.");
 	bzero(paths, sizeof(paths));
 	len =3D sizeof(paths);
 	if (sysctlbyname("kern.module_path", paths, &len, NULL, 0) < 0)

--------------000700020102080200020605--

--------------enig5AEC92BB62BABAD0BA2C3629
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)

iQEcBAEBAgAGBQJMKIjvAAoJEAHF6gQQyKF624MIAKS27Gfj5Oa3R598E8X/6Vu7
e7Hhyi/f4goCuEeKDFsXx/fgio/Khevia9hMgDGZBGdMHPZO90HLFuziJhHmXn4U
w2yyFCTWimb6owQqjQVu5UdRYaCABO2/xAbKWU+zRF4hXj0Psh4W542ocPpILOuR
QwOPhlv7t5JMYmYDQvI3nqV9sFXOxRM++YzKdYNSCV5Scqe1W4YSCX4gH6R3ZUGf
fJAEJPWbyTnvrLWSn3NkRSSGf5zmXF86H+AIzQ7hLxzCaVgKoe5PCSarZQ2gCI3n
dp9zOSB3tvFKi91mnYtat5ldzq5SLHAGgrdvRGGsYMDrTU7JNZAKo35mqKy+ol0=
=eymU
-----END PGP SIGNATURE-----

--------------enig5AEC92BB62BABAD0BA2C3629--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4C2888EC.8030103>