diff options
author | pjd <pjd@FreeBSD.org> | 2007-05-05 17:12:15 +0000 |
---|---|---|
committer | pjd <pjd@FreeBSD.org> | 2007-05-05 17:12:15 +0000 |
commit | 4e8b8cd34e540dbe8aaf82fa1d7f01cf051c0252 (patch) | |
tree | 7d22237201ddbee7705e00419726c8f2c8affff2 /sys/geom/geom_disk.c | |
parent | adc7ddd9913f83a3fe4cd2acab943466822f9927 (diff) | |
download | FreeBSD-src-4e8b8cd34e540dbe8aaf82fa1d7f01cf051c0252.zip FreeBSD-src-4e8b8cd34e540dbe8aaf82fa1d7f01cf051c0252.tar.gz |
- Extend disk structure to allow to store disk's serial number, which can be
retrieved via GEOM::ident attribute.
- Bump disk(9) ABI version.
OK'ed by: phk
Diffstat (limited to 'sys/geom/geom_disk.c')
-rw-r--r-- | sys/geom/geom_disk.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/geom/geom_disk.c b/sys/geom/geom_disk.c index 390cd8f..482226b 100644 --- a/sys/geom/geom_disk.c +++ b/sys/geom/geom_disk.c @@ -301,6 +301,8 @@ g_disk_start(struct bio *bp) break; else if (g_handleattr_off_t(bp, "GEOM::frontstuff", 0)) break; + else if (g_handleattr_str(bp, "GEOM::ident", dp->d_ident)) + break; else if (!strcmp(bp->bio_attribute, "GEOM::kerneldump")) g_disk_kerneldump(bp, dp); else @@ -408,7 +410,7 @@ disk_alloc() void disk_create(struct disk *dp, int version) { - if (version != DISK_VERSION_00) { + if (version != DISK_VERSION_00 && version != DISK_VERSION_01) { printf("WARNING: Attempt to add disk %s%d %s", dp->d_name, dp->d_unit, " using incompatible ABI version of disk(9)\n"); |