Deleted Added
full compact
devicename.c (172940) devicename.c (181282)
1/*-
2 * Copyright (c) 1998 Michael Smith <msmith@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

--- 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) 1998 Michael Smith <msmith@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

--- 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/sys/boot/i386/libi386/devicename.c 172940 2007-10-24 21:33:00Z jhb $");
28__FBSDID("$FreeBSD: head/sys/boot/i386/libi386/devicename.c 181282 2008-08-04 07:01:42Z cperciva $");
29
30#include <stand.h>
31#include <string.h>
32#include <sys/disklabel.h>
33#include "bootstrap.h"
34#include "libi386.h"
35
36static int i386_parsedev(struct i386_devdesc **dev, const char *devspec, const char **path);

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

145 partition = *cp - 'a'; /* got a partition number */
146 if ((partition < 0) || (partition >= MAXPARTITIONS)) {
147 err = EPART;
148 goto fail;
149 }
150 cp++;
151 }
152 }
29
30#include <stand.h>
31#include <string.h>
32#include <sys/disklabel.h>
33#include "bootstrap.h"
34#include "libi386.h"
35
36static int i386_parsedev(struct i386_devdesc **dev, const char *devspec, const char **path);

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

145 partition = *cp - 'a'; /* got a partition number */
146 if ((partition < 0) || (partition >= MAXPARTITIONS)) {
147 err = EPART;
148 goto fail;
149 }
150 cp++;
151 }
152 }
153 } else {
154 cp = np;
153 }
154 if (*cp && (*cp != ':')) {
155 err = EINVAL;
156 goto fail;
157 }
158
159 idev->d_unit = unit;
160 idev->d_kind.biosdisk.slice = slice;

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

168 unit = 0;
169
170 if (*np && (*np != ':')) {
171 unit = strtol(np, &cp, 0); /* get unit number if present */
172 if (cp == np) {
173 err = EUNIT;
174 goto fail;
175 }
155 }
156 if (*cp && (*cp != ':')) {
157 err = EINVAL;
158 goto fail;
159 }
160
161 idev->d_unit = unit;
162 idev->d_kind.biosdisk.slice = slice;

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

170 unit = 0;
171
172 if (*np && (*np != ':')) {
173 unit = strtol(np, &cp, 0); /* get unit number if present */
174 if (cp == np) {
175 err = EUNIT;
176 goto fail;
177 }
178 } else {
179 cp = np;
176 }
177 if (*cp && (*cp != ':')) {
178 err = EINVAL;
179 goto fail;
180 }
181
182 idev->d_unit = unit;
183 if (path != NULL)

--- 75 unchanged lines hidden ---
180 }
181 if (*cp && (*cp != ':')) {
182 err = EINVAL;
183 goto fail;
184 }
185
186 idev->d_unit = unit;
187 if (path != NULL)

--- 75 unchanged lines hidden ---