Deleted Added
full compact
geom_part.c (213187) geom_part.c (213662)
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 213187 2010-09-26 21:48:32Z ae $");
28__FBSDID("$FreeBSD: head/sbin/geom/class/part/geom_part.c 213662 2010-10-09 20:20:27Z ae $");
29
30#include <sys/stat.h>
31#include <sys/vtoc.h>
32
33#include <assert.h>
34#include <err.h>
35#include <errno.h>
36#include <fcntl.h>

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

182 return (NULL);
183}
184
185static struct ggeom *
186find_geom(struct gclass *classp, const char *name)
187{
188 struct ggeom *gp;
189
29
30#include <sys/stat.h>
31#include <sys/vtoc.h>
32
33#include <assert.h>
34#include <err.h>
35#include <errno.h>
36#include <fcntl.h>

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

182 return (NULL);
183}
184
185static struct ggeom *
186find_geom(struct gclass *classp, const char *name)
187{
188 struct ggeom *gp;
189
190 if (strncmp(name, _PATH_DEV, strlen(_PATH_DEV)) == 0)
191 name += strlen(_PATH_DEV);
190 if (strncmp(name, _PATH_DEV, sizeof(_PATH_DEV) - 1) == 0)
191 name += sizeof(_PATH_DEV) - 1;
192 LIST_FOREACH(gp, &classp->lg_geom, lg_geom) {
193 if (strcmp(gp->lg_name, name) == 0)
194 return (gp);
195 }
196 return (NULL);
197}
198
199static const char *

--- 791 unchanged lines hidden ---
192 LIST_FOREACH(gp, &classp->lg_geom, lg_geom) {
193 if (strcmp(gp->lg_name, name) == 0)
194 return (gp);
195 }
196 return (NULL);
197}
198
199static const char *

--- 791 unchanged lines hidden ---