Deleted Added
full compact
geom_part.c (215672) geom_part.c (215704)
1/*-
2 * Copyright (c) 2007, 2008 Marcel Moolenaar
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

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

20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 */
26
27#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2007, 2008 Marcel Moolenaar
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

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

20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 */
26
27#include <sys/cdefs.h>
28__FBSDID("$FreeBSD: head/sbin/geom/class/part/geom_part.c 215672 2010-11-22 11:24:11Z ae $");
28__FBSDID("$FreeBSD: head/sbin/geom/class/part/geom_part.c 215704 2010-11-22 20:10:48Z brucec $");
29
30#include <sys/stat.h>
31#include <sys/vtoc.h>
32
33#include <assert.h>
34#include <ctype.h>
35#include <err.h>
36#include <errno.h>

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

609 }
610 printf("\n");
611}
612
613static int
614gpart_show_hasopt(struct gctl_req *req, const char *opt, const char *elt)
615{
616
29
30#include <sys/stat.h>
31#include <sys/vtoc.h>
32
33#include <assert.h>
34#include <ctype.h>
35#include <err.h>
36#include <errno.h>

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

609 }
610 printf("\n");
611}
612
613static int
614gpart_show_hasopt(struct gctl_req *req, const char *opt, const char *elt)
615{
616
617 if (!gctl_get_int(req, opt))
617 if (!gctl_get_int(req, "%s", opt))
618 return (0);
619
620 if (elt != NULL)
621 errx(EXIT_FAILURE, "-l and -r are mutually exclusive");
622
623 return (1);
624}
625

--- 616 unchanged lines hidden ---
618 return (0);
619
620 if (elt != NULL)
621 errx(EXIT_FAILURE, "-l and -r are mutually exclusive");
622
623 return (1);
624}
625

--- 616 unchanged lines hidden ---