Deleted Added
full compact
geom_slice.c (93250) geom_slice.c (93326)
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

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

27 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
28 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
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 *
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

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

27 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
28 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
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 * $FreeBSD: head/sys/geom/geom_slice.c 93250 2002-03-26 22:07:38Z phk $
35 * $FreeBSD: head/sys/geom/geom_slice.c 93326 2002-03-28 10:09:24Z phk $
36 */
37
38
39#include <sys/param.h>
40#ifndef _KERNEL
41#include <stdio.h>
42#include <unistd.h>
43#include <stdlib.h>

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

171 struct g_mbr_softc *mp;
172 struct g_slicer *gsp;
173
174 gsp = gp->softc;
175 mp = gsp->softc;
176 if (pp != NULL) {
177 sbuf_printf(sb, "%s<index>%u</index>\n", indent, pp->index);
178 sbuf_printf(sb, "%s<length>%llu</length>\n",
36 */
37
38
39#include <sys/param.h>
40#ifndef _KERNEL
41#include <stdio.h>
42#include <unistd.h>
43#include <stdlib.h>

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

171 struct g_mbr_softc *mp;
172 struct g_slicer *gsp;
173
174 gsp = gp->softc;
175 mp = gsp->softc;
176 if (pp != NULL) {
177 sbuf_printf(sb, "%s<index>%u</index>\n", indent, pp->index);
178 sbuf_printf(sb, "%s<length>%llu</length>\n",
179 indent, gsp->slices[pp->index].length);
180 sbuf_printf(sb, "%s%llu\n",
181 indent, gsp->slices[pp->index].length / 512);
182 sbuf_printf(sb, "%s%llu\n",
183 indent, gsp->slices[pp->index].offset);
184 sbuf_printf(sb, "%s%llu\n",
185 indent, gsp->slices[pp->index].offset / 512);
179 indent, (unsigned long long)gsp->slices[pp->index].length);
180 sbuf_printf(sb, "%s<seclength>%llu</seclength>\n", indent,
181 (unsigned long long)gsp->slices[pp->index].length / 512);
182 sbuf_printf(sb, "%s<offset>%llu</offset>\n", indent,
183 (unsigned long long)gsp->slices[pp->index].offset);
184 sbuf_printf(sb, "%s<secoffset>%llu</secoffset>\n", indent,
185 (unsigned long long)gsp->slices[pp->index].offset / 512);
186 }
187}
188
189struct g_provider *
190g_slice_addslice(struct g_geom *gp, int index, off_t offset, off_t length, char *fmt, ...)
191{
192 struct g_provider *pp;
193 struct g_slicer *gsp;

--- 76 unchanged lines hidden ---
186 }
187}
188
189struct g_provider *
190g_slice_addslice(struct g_geom *gp, int index, off_t offset, off_t length, char *fmt, ...)
191{
192 struct g_provider *pp;
193 struct g_slicer *gsp;

--- 76 unchanged lines hidden ---