Deleted Added
full compact
geom_pc98.c (105542) geom_pc98.c (105551)
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

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

27 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
28 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
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 *
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

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

27 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
28 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
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 * $FreeBSD: head/sys/geom/geom_pc98.c 105542 2002-10-20 19:18:07Z phk $
35 * $FreeBSD: head/sys/geom/geom_pc98.c 105551 2002-10-20 20:28:24Z phk $
36 */
37
38
39#include <sys/param.h>
40#include <sys/stdint.h>
41#ifndef _KERNEL
42#include <stdio.h>
43#include <string.h>

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

108 return (NULL);
109 gsp = gp->softc;
110 g_topology_unlock();
111 gp->dumpconf = g_pc98_dumpconf;
112 npart = 0;
113 while (1) { /* a trick to allow us to use break */
114 if (gp->rank != 2 && flags == G_TF_NORMAL)
115 break;
36 */
37
38
39#include <sys/param.h>
40#include <sys/stdint.h>
41#ifndef _KERNEL
42#include <stdio.h>
43#include <string.h>

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

108 return (NULL);
109 gsp = gp->softc;
110 g_topology_unlock();
111 gp->dumpconf = g_pc98_dumpconf;
112 npart = 0;
113 while (1) { /* a trick to allow us to use break */
114 if (gp->rank != 2 && flags == G_TF_NORMAL)
115 break;
116 error = g_getattr("GEOM::sectorsize", cp, &sectorsize);
117 if (error) {
118 sectorsize = 512;
119 printf("g_pc98_taste: error %d Sectors are %d bytes\n",
120 error, sectorsize);
121 }
122 error = g_getattr("GEOM::mediasize", cp, &mediasize);
123 if (error) {
124 mediasize = 0;
125 printf("g_error %d Mediasize is %jd bytes\n",
126 error, (intmax_t)mediasize);
127 }
116 sectorsize = cp->provider->sectorsize;
117 if (sectorsize < 512)
118 break;
119 mediasize = cp->provider->mediasize;
128 error = g_getattr("GEOM::fwsectors", cp, &fwsect);
129 if (error || fwsect == 0) {
130 fwsect = 17;
131 printf("g_pc98_taste: error %d guessing %d sectors\n",
132 error, fwsect);
133 }
134 error = g_getattr("GEOM::fwheads", cp, &fwhead);
135 if (error || fwhead == 0) {

--- 52 unchanged lines hidden ---
120 error = g_getattr("GEOM::fwsectors", cp, &fwsect);
121 if (error || fwsect == 0) {
122 fwsect = 17;
123 printf("g_pc98_taste: error %d guessing %d sectors\n",
124 error, fwsect);
125 }
126 error = g_getattr("GEOM::fwheads", cp, &fwhead);
127 if (error || fwhead == 0) {

--- 52 unchanged lines hidden ---