Resync with kernel.
This commit is contained in:
parent
5d46839577
commit
f761b0e1cb
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=105896
@ -66,6 +66,8 @@ struct bio {
|
||||
void *bio_data;
|
||||
const char *bio_attribute; /* BIO_GETATTR/BIO_SETATTR */
|
||||
int bio_error;
|
||||
u_int bio_children; /* Number of spawned bios */
|
||||
|
||||
|
||||
struct bio *bio_linkage;
|
||||
int bio_flags;
|
||||
@ -137,17 +139,20 @@ void g_simdisk_stop(char *name);
|
||||
void g_simdisk_restart(char *name);
|
||||
|
||||
#define DECLARE_GEOM_CLASS(class, name) \
|
||||
void name##_init(void); \
|
||||
void \
|
||||
name##_init(void) \
|
||||
{ \
|
||||
g_add_class(&class); \
|
||||
}
|
||||
|
||||
void g_pc98_init(void);
|
||||
void g_sunlabel_init(void);
|
||||
void g_aes_init(void);
|
||||
void g_bsd_init(void);
|
||||
void g_mbr_init(void);
|
||||
void g_mbrext_init(void);
|
||||
void g_sunlabel_init(void);
|
||||
void g_pc98_init(void);
|
||||
|
||||
|
||||
void *thread_sim(void *ptr);
|
||||
|
||||
|
@ -104,16 +104,12 @@ g_simdisk_start(struct bio *bp)
|
||||
return;
|
||||
}
|
||||
if (bp->bio_cmd == BIO_GETATTR) {
|
||||
if (g_handleattr_int(bp, "GEOM::sectorsize", sc->sectorsize))
|
||||
return;
|
||||
if (g_handleattr_int(bp, "GEOM::fwsectors", sc->fwsectors))
|
||||
return;
|
||||
if (g_handleattr_int(bp, "GEOM::fwheads", sc->fwheads))
|
||||
return;
|
||||
if (g_handleattr_int(bp, "GEOM::fwcylinders", sc->fwcylinders))
|
||||
return;
|
||||
if (g_handleattr_off_t(bp, "GEOM::mediasize", sc->mediasize))
|
||||
return;
|
||||
}
|
||||
g_io_deliver(bp, EOPNOTSUPP);
|
||||
}
|
||||
@ -139,7 +135,8 @@ g_simdisk_create(char *name, struct simdisk_softc *sc)
|
||||
gp->access = g_std_access;
|
||||
|
||||
pp = g_new_providerf(gp, "%s", name);
|
||||
pp->mediasize=sc->mediasize;
|
||||
pp->mediasize = sc->mediasize;
|
||||
pp->sectorsize = sc->sectorsize;
|
||||
g_error_provider(pp, 0);
|
||||
unit++;
|
||||
g_topology_unlock();
|
||||
|
Loading…
Reference in New Issue
Block a user