summaryrefslogtreecommitdiffstats
path: root/sys/geom/geom_bsd.c
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2003-05-31 19:30:52 +0000
committerphk <phk@FreeBSD.org>2003-05-31 19:30:52 +0000
commit23436c40b94e47ff307e35090250d6ebbf05770d (patch)
tree14d6170ccd797af6f9b8a924c2c91e836c8e34b8 /sys/geom/geom_bsd.c
parentf0f1321766d501296589a81e367d4ce27b5e30fb (diff)
downloadFreeBSD-src-23436c40b94e47ff307e35090250d6ebbf05770d.zip
FreeBSD-src-23436c40b94e47ff307e35090250d6ebbf05770d.tar.gz
Remove unused variables.
Remove #ifdef notyet which will never become. Found by: FlexeLint
Diffstat (limited to 'sys/geom/geom_bsd.c')
-rw-r--r--sys/geom/geom_bsd.c25
1 files changed, 2 insertions, 23 deletions
diff --git a/sys/geom/geom_bsd.c b/sys/geom/geom_bsd.c
index 63dc830..562c78a 100644
--- a/sys/geom/geom_bsd.c
+++ b/sys/geom/geom_bsd.c
@@ -88,7 +88,7 @@ g_bsd_modify(struct g_geom *gp, u_char *label)
struct g_consumer *cp;
struct g_bsd_softc *ms;
u_int secsize, u;
- off_t mediasize, rawoffset, o;
+ off_t rawoffset, o;
struct disklabel dl;
MD5_CTX md5sum;
@@ -104,20 +104,6 @@ g_bsd_modify(struct g_geom *gp, u_char *label)
/* Get dimensions of our device. */
cp = LIST_FIRST(&gp->consumer);
secsize = cp->provider->sectorsize;
- mediasize = cp->provider->mediasize;
-
-#ifdef notyet
- /*
- * Indications are that the d_secperunit is not correctly
- * initialized in many cases, and since we don't need it
- * for anything, we dont strictly need this test.
- * Preemptive action to avoid confusing people in disklabel(8)
- * may be in order.
- */
- /* The label cannot claim a larger size than the media. */
- if ((off_t)dl.d_secperunit * dl.d_secsize > mediasize)
- return (EINVAL);
-#endif
/* ... or a smaller sector size. */
if (dl.d_secsize < secsize) {
@@ -294,8 +280,6 @@ g_bsd_ioctl(void *arg, int flag)
{
struct bio *bp;
struct g_geom *gp;
- struct g_slicer *gsp;
- struct g_bsd_softc *ms;
struct g_ioctl *gio;
u_char *label;
int error;
@@ -308,8 +292,6 @@ g_bsd_ioctl(void *arg, int flag)
}
gp = bp->bio_to->geom;
- gsp = gp->softc;
- ms = gsp->softc;
gio = (struct g_ioctl *)bp->bio_data;
label = g_malloc(LABELSIZE, M_WAITOK);
@@ -342,7 +324,6 @@ g_bsd_diocbsdbb(dev_t dev, u_long cmd __unused, caddr_t data, int fflag __unused
struct g_consumer *cp;
u_char *buf;
void *p;
- u_int secsize;
int error, i;
uint64_t sum;
@@ -362,7 +343,6 @@ g_bsd_diocbsdbb(dev_t dev, u_long cmd __unused, caddr_t data, int fflag __unused
error = g_bsd_modify(gp, buf + ms->labeloffset);
if (!error) {
cp = LIST_FIRST(&gp->consumer);
- secsize = cp->provider->sectorsize;
if (ms->labeloffset == ALPHA_LABEL_OFFSET) {
sum = 0;
for (i = 0; i < 63; i++)
@@ -694,13 +674,12 @@ static int
g_bsd_config(struct gctl_req *req, struct g_geom *gp, const char *verb)
{
u_char *label;
- int error, i;
+ int error;
struct h0h0 h0h0;
struct g_slicer *gsp;
struct g_consumer *cp;
struct g_bsd_softc *ms;
- i = 0;
g_topology_assert();
cp = LIST_FIRST(&gp->consumer);
gsp = gp->softc;
OpenPOWER on IntegriCloud