Lines Matching defs:ms

101 	struct g_bsd_softc *ms;
109 ms = gsp->softc;
143 if (rawoffset != 0 && (off_t)rawoffset != ms->mbroffset)
146 (intmax_t)ms->mbroffset/dl.d_secsize,
179 ms->ondisk = dl;
180 if (label != ms->label)
181 bcopy(label, ms->label, LABELSIZE);
182 ms->rawoffset = rawoffset;
191 MD5Update(&md5sum, ms->label, sizeof(ms->label));
192 MD5Final(ms->labelsum, &md5sum);
205 g_bsd_try(struct g_geom *gp, struct g_slicer *gsp, struct g_consumer *cp, int secsize, struct g_bsd_softc *ms, off_t offset)
222 dl = &ms->ondisk;
225 bcopy(buf + secoff, ms->label, LABELSIZE);
230 ms->labeloffset = offset;
246 struct g_bsd_softc *ms;
252 ms = gsp->softc;
256 secoff = ms->labeloffset % secsize;
258 buf = g_read_data(cp, ms->labeloffset - secoff, secsize, &error);
261 bcopy(ms->label, buf + secoff, sizeof(ms->label));
264 bcopy(ms->label, buf + ms->labeloffset, sizeof(ms->label));
266 if (ms->labeloffset == ALPHA_LABEL_OFFSET) {
273 error = g_write_data(cp, ms->labeloffset - secoff, buf, secsize);
293 struct g_bsd_softc *ms;
306 ms = gsp->softc;
308 p = (u_char*)bp->bio_data + ms->labeloffset -
322 struct g_bsd_softc *ms;
327 ms = gsp->softc;
329 if (g_handleattr(bp, "BSD::labelsum", ms->labelsum,
330 sizeof(ms->labelsum)))
344 struct g_bsd_softc *ms;
348 ms = gsp->softc;
352 indent, (intmax_t)ms->labeloffset);
354 indent, (intmax_t)ms->rawoffset);
356 indent, (intmax_t)ms->mbroffset);
360 ms->ondisk.d_partitions[pp->index].p_fstype);
363 ms->ondisk.d_partitions[pp->index].p_fstype);
393 struct g_bsd_softc *ms;
416 gp = g_slice_new(mp, MAXPARTITIONS, pp, &cp, &ms,
417 sizeof(*ms), g_bsd_start);
439 error = g_getattr("MBR::offset", cp, &ms->mbroffset);
449 error = g_getattr("PC98::offset", cp, &ms->mbroffset);
468 error = g_bsd_try(gp, gsp, cp, secsize, ms, secsize);
476 error = g_bsd_try(gp, gsp, cp, secsize, ms,
481 error = g_bsd_try(gp, gsp, cp, secsize, ms,
495 MD5Update(&md5sum, ms->label, sizeof(ms->label));
496 MD5Final(ms->labelsum, &md5sum);
499 if (!error && !bcmp(ms->labelsum, hash, sizeof(hash)))
506 error = g_bsd_modify(gp, ms->label);
514 g_slice_conf_hot(gp, 0, ms->labeloffset, LABELSIZE,
530 struct g_bsd_softc *ms;
558 struct g_bsd_softc *ms;
566 ms = gsp->softc;
568 gctl_set_param_err(req, "mbroffset", &ms->mbroffset,
569 sizeof(ms->mbroffset));
576 h0h0.ms = gsp->softc;