g_nop.c (e370e911b23398888b3df56c906fe41fedd106b0) | g_nop.c (1d723f1d518b79fdea655f82e5419ae4888ad78c) |
---|---|
1/*- 2 * Copyright (c) 2004 Pawel Jakub Dawidek <pjd@FreeBSD.org> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 454 unchanged lines hidden (view full) --- 463} 464 465static void 466g_nop_dumpconf(struct sbuf *sb, const char *indent, struct g_geom *gp, 467 struct g_consumer *cp, struct g_provider *pp) 468{ 469 struct g_nop_softc *sc; 470 | 1/*- 2 * Copyright (c) 2004 Pawel Jakub Dawidek <pjd@FreeBSD.org> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 454 unchanged lines hidden (view full) --- 463} 464 465static void 466g_nop_dumpconf(struct sbuf *sb, const char *indent, struct g_geom *gp, 467 struct g_consumer *cp, struct g_provider *pp) 468{ 469 struct g_nop_softc *sc; 470 |
471 if (pp == NULL) | 471 if (pp != NULL || cp != NULL) |
472 return; 473 sc = gp->softc; | 472 return; 473 sc = gp->softc; |
474 sbuf_printf(sb, "%s<offset>%jd</offset>\n", indent, | 474 sbuf_printf(sb, "%s<Offset>%jd</Offset>\n", indent, |
475 (intmax_t)sc->sc_offset); | 475 (intmax_t)sc->sc_offset); |
476 sbuf_printf(sb, "%s<failprob>%u</failprob>\n", indent, sc->sc_failprob); | 476 sbuf_printf(sb, "%s<Failprob>%u</Failprob>\n", indent, sc->sc_failprob); |
477} 478 479DECLARE_GEOM_CLASS(g_nop_class, g_nop); | 477} 478 479DECLARE_GEOM_CLASS(g_nop_class, g_nop); |