diff options
author | nwhitehorn <nwhitehorn@FreeBSD.org> | 2011-02-26 14:58:54 +0000 |
---|---|---|
committer | nwhitehorn <nwhitehorn@FreeBSD.org> | 2011-02-26 14:58:54 +0000 |
commit | 3fa7ecd6134abe348569c648a52df0da771219ae (patch) | |
tree | 44bde4d5f256ba7cfb26815701cdc05607d77274 /sys/dev/ata | |
parent | 34864eccf3e5ec4e2a15c089a5f21e4496eaeb4d (diff) | |
download | FreeBSD-src-3fa7ecd6134abe348569c648a52df0da771219ae.zip FreeBSD-src-3fa7ecd6134abe348569c648a52df0da771219ae.tar.gz |
Add the disk ident and a human-meaningful description (here, the disk model
string) to the geom_disk config XML so that they are easily accessible from
userland.
MFC after: 1 week
Diffstat (limited to 'sys/dev/ata')
-rw-r--r-- | sys/dev/ata/ata-disk.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/dev/ata/ata-disk.c b/sys/dev/ata/ata-disk.c index 85b6a54..bcaf6c4 100644 --- a/sys/dev/ata/ata-disk.c +++ b/sys/dev/ata/ata-disk.c @@ -145,6 +145,8 @@ ad_attach(device_t dev) adp->disk->d_flags |= DISKFLAG_CANDELETE; strlcpy(adp->disk->d_ident, atadev->param.serial, sizeof(adp->disk->d_ident)); + strlcpy(adp->disk->d_descr, atadev->param.model, + sizeof(adp->disk->d_descr)); parent = device_get_parent(ch->dev); if (parent != NULL && device_get_parent(parent) != NULL && (device_get_devclass(parent) == |