geom_dump.c (152342) | geom_dump.c (202454) |
---|---|
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_dump.c 152342 2005-11-12 20:02:02Z marcel $"); | 37__FBSDID("$FreeBSD: head/sys/geom/geom_dump.c 202454 2010-01-17 06:20:30Z delphij $"); |
38 39#include <sys/param.h> 40#include <sys/sbuf.h> 41#include <sys/systm.h> 42#include <sys/malloc.h> 43#include <machine/stdarg.h> 44 45#include <geom/geom.h> --- 134 unchanged lines hidden (view full) --- 180 sbuf_printf(sb, "\t<provider id=\"%p\">\n", pp); 181 sbuf_printf(sb, "\t <geom ref=\"%p\"/>\n", pp->geom); 182 sbuf_printf(sb, "\t <mode>r%dw%de%d</mode>\n", 183 pp->acr, pp->acw, pp->ace); 184 sbuf_printf(sb, "\t <name>%s</name>\n", pp->name); 185 sbuf_printf(sb, "\t <mediasize>%jd</mediasize>\n", 186 (intmax_t)pp->mediasize); 187 sbuf_printf(sb, "\t <sectorsize>%u</sectorsize>\n", pp->sectorsize); | 38 39#include <sys/param.h> 40#include <sys/sbuf.h> 41#include <sys/systm.h> 42#include <sys/malloc.h> 43#include <machine/stdarg.h> 44 45#include <geom/geom.h> --- 134 unchanged lines hidden (view full) --- 180 sbuf_printf(sb, "\t<provider id=\"%p\">\n", pp); 181 sbuf_printf(sb, "\t <geom ref=\"%p\"/>\n", pp->geom); 182 sbuf_printf(sb, "\t <mode>r%dw%de%d</mode>\n", 183 pp->acr, pp->acw, pp->ace); 184 sbuf_printf(sb, "\t <name>%s</name>\n", pp->name); 185 sbuf_printf(sb, "\t <mediasize>%jd</mediasize>\n", 186 (intmax_t)pp->mediasize); 187 sbuf_printf(sb, "\t <sectorsize>%u</sectorsize>\n", pp->sectorsize); |
188 if (pp->stripesize > 0) { 189 sbuf_printf(sb, "\t <stripesize>%u</stripesize>\n", pp->stripesize); 190 sbuf_printf(sb, "\t <stripeoffset>%u</stripeoffset>\n", pp->stripeoffset); 191 } |
|
188 if (pp->geom->flags & G_GEOM_WITHER) 189 ; 190 else if (pp->geom->dumpconf != NULL) { 191 sbuf_printf(sb, "\t <config>\n"); 192 pp->geom->dumpconf(sb, "\t ", pp->geom, NULL, pp); 193 sbuf_printf(sb, "\t </config>\n"); 194 } 195 sbuf_printf(sb, "\t</provider>\n"); --- 86 unchanged lines hidden --- | 192 if (pp->geom->flags & G_GEOM_WITHER) 193 ; 194 else if (pp->geom->dumpconf != NULL) { 195 sbuf_printf(sb, "\t <config>\n"); 196 pp->geom->dumpconf(sb, "\t ", pp->geom, NULL, pp); 197 sbuf_printf(sb, "\t </config>\n"); 198 } 199 sbuf_printf(sb, "\t</provider>\n"); --- 86 unchanged lines hidden --- |