Deleted Added
full compact
geom_sunlabel.c (125755) geom_sunlabel.c (133314)
1/*-
2 * Copyright (c) 2002 Poul-Henning Kamp
3 * Copyright (c) 2002 Networks Associates Technology, Inc.
4 * All rights reserved.
5 *
6 * This software was developed for the FreeBSD Project by Poul-Henning Kamp
7 * and NAI Labs, the Security Research Division of Network Associates, Inc.
8 * under DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the

--- 20 unchanged lines hidden (view full) ---

29 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
32 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33 * SUCH DAMAGE.
34 */
35
36#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2002 Poul-Henning Kamp
3 * Copyright (c) 2002 Networks Associates Technology, Inc.
4 * All rights reserved.
5 *
6 * This software was developed for the FreeBSD Project by Poul-Henning Kamp
7 * and NAI Labs, the Security Research Division of Network Associates, Inc.
8 * under DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the

--- 20 unchanged lines hidden (view full) ---

29 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
32 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33 * SUCH DAMAGE.
34 */
35
36#include <sys/cdefs.h>
37__FBSDID("$FreeBSD: head/sys/geom/geom_sunlabel.c 125755 2004-02-12 22:42:11Z phk $");
37__FBSDID("$FreeBSD: head/sys/geom/geom_sunlabel.c 133314 2004-08-08 06:49:07Z phk $");
38
39#include <sys/param.h>
40#include <sys/endian.h>
41#include <sys/systm.h>
42#include <sys/kernel.h>
43#include <sys/conf.h>
44#include <sys/bio.h>
45#include <sys/malloc.h>

--- 192 unchanged lines hidden (view full) ---

238 g_topology_assert();
239 if (flags == G_TF_NORMAL &&
240 !strcmp(pp->geom->class->name, SUNLABEL_CLASS_NAME))
241 return (NULL);
242 gp = g_slice_new(mp, 8, pp, &cp, &ms, sizeof *ms, NULL);
243 if (gp == NULL)
244 return (NULL);
245 gsp = gp->softc;
38
39#include <sys/param.h>
40#include <sys/endian.h>
41#include <sys/systm.h>
42#include <sys/kernel.h>
43#include <sys/conf.h>
44#include <sys/bio.h>
45#include <sys/malloc.h>

--- 192 unchanged lines hidden (view full) ---

238 g_topology_assert();
239 if (flags == G_TF_NORMAL &&
240 !strcmp(pp->geom->class->name, SUNLABEL_CLASS_NAME))
241 return (NULL);
242 gp = g_slice_new(mp, 8, pp, &cp, &ms, sizeof *ms, NULL);
243 if (gp == NULL)
244 return (NULL);
245 gsp = gp->softc;
246 gp->dumpconf = g_sunlabel_dumpconf;
247 do {
248 if (gp->rank != 2 && flags == G_TF_NORMAL)
249 break;
250 ms->sectorsize = cp->provider->sectorsize;
251 if (ms->sectorsize < 512)
252 break;
253 g_topology_unlock();
254 buf = g_read_data(cp, 0, ms->sectorsize, &error);

--- 16 unchanged lines hidden (view full) ---

271 gsp->hot = g_sunlabel_hotwrite;
272 return (gp);
273}
274
275static struct g_class g_sunlabel_class = {
276 .name = SUNLABEL_CLASS_NAME,
277 .taste = g_sunlabel_taste,
278 .ctlreq = g_sunlabel_config,
246 do {
247 if (gp->rank != 2 && flags == G_TF_NORMAL)
248 break;
249 ms->sectorsize = cp->provider->sectorsize;
250 if (ms->sectorsize < 512)
251 break;
252 g_topology_unlock();
253 buf = g_read_data(cp, 0, ms->sectorsize, &error);

--- 16 unchanged lines hidden (view full) ---

270 gsp->hot = g_sunlabel_hotwrite;
271 return (gp);
272}
273
274static struct g_class g_sunlabel_class = {
275 .name = SUNLABEL_CLASS_NAME,
276 .taste = g_sunlabel_taste,
277 .ctlreq = g_sunlabel_config,
278 .dumpconf = g_sunlabel_dumpconf,
279};
280
281DECLARE_GEOM_CLASS(g_sunlabel_class, g_sunlabel);
279};
280
281DECLARE_GEOM_CLASS(g_sunlabel_class, g_sunlabel);