diff options
author | 2013-01-15 09:28:29 +0000 | |
---|---|---|
committer | 2013-01-15 09:28:29 +0000 | |
commit | 6d81b338184f7bf605d837017c5647ae89a4317d (patch) | |
tree | 5f9598a9c2a2a387087f6febde3524ae125d58e5 /sys/dev/softraid_raid0.c | |
parent | Make the FAT setattr handling more consistent about unsupported (diff) | |
download | wireguard-openbsd-6d81b338184f7bf605d837017c5647ae89a4317d.tar.xz wireguard-openbsd-6d81b338184f7bf605d837017c5647ae89a4317d.zip |
Always initialise the discipline name, not just when we are doing a create.
Diffstat (limited to 'sys/dev/softraid_raid0.c')
-rw-r--r-- | sys/dev/softraid_raid0.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/softraid_raid0.c b/sys/dev/softraid_raid0.c index 734dc2e4d68..3946e50900d 100644 --- a/sys/dev/softraid_raid0.c +++ b/sys/dev/softraid_raid0.c @@ -1,4 +1,4 @@ -/* $OpenBSD: softraid_raid0.c,v 1.28 2013/01/15 04:03:01 jsing Exp $ */ +/* $OpenBSD: softraid_raid0.c,v 1.29 2013/01/15 09:28:29 jsing Exp $ */ /* * Copyright (c) 2008 Marco Peereboom <marco@peereboom.us> * @@ -60,6 +60,7 @@ sr_raid0_discipline_init(struct sr_discipline *sd) /* Fill out discipline members. */ sd->sd_type = SR_MD_RAID0; + strlcpy(sd->sd_name, "RAID 0", sizeof(sd->sd_name)); sd->sd_capabilities = SR_CAP_SYSTEM_DISK | SR_CAP_AUTO_ASSEMBLE; sd->sd_max_wu = SR_RAID0_NOWU; @@ -85,7 +86,6 @@ sr_raid0_create(struct sr_discipline *sd, struct bioc_createraid *bc, * XXX add variable strip size later even though MAXPHYS is really * the clever value, users like to tinker with that type of stuff. */ - strlcpy(sd->sd_name, "RAID 0", sizeof(sd->sd_name)); sd->sd_meta->ssdi.ssd_strip_size = MAXPHYS; sd->sd_meta->ssdi.ssd_size = (coerced_size & ~((sd->sd_meta->ssdi.ssd_strip_size >> DEV_BSHIFT) - 1)) * no_chunk; |