Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F154510875
D6516.id17015.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D6516.id17015.diff
View Options
Index: head/UPDATING
===================================================================
--- head/UPDATING
+++ head/UPDATING
@@ -31,6 +31,16 @@
disable the most expensive debugging functionality run
"ln -s 'abort:false,junk:false' /etc/malloc.conf".)
+20160527:
+ CAM will now strip leading spaces from SCSI disks' serial numbers.
+ This will effect users who create UFS filesystems on SCSI disks using
+ those disk's diskid device nodes. For example, if /etc/fstab
+ previously contained a line like
+ "/dev/diskid/DISK-%20%20%20%20%20%20%20ABCDEFG0123456", you should
+ change it to "/dev/diskid/DISK-ABCDEFG0123456". Users of geom
+ transfers like gmirror may also be affected. ZFS users should
+ generally be fine.
+
20160523:
The bitstring(3) API has been updated with new functionality and
improved performance. But it is binary-incompatible with the old API.
Index: head/sys/cam/scsi/scsi_xpt.c
===================================================================
--- head/sys/cam/scsi/scsi_xpt.c
+++ head/sys/cam/scsi/scsi_xpt.c
@@ -1559,13 +1559,22 @@
(u_int8_t *)malloc((serial_buf->length + 1),
M_CAMXPT, M_NOWAIT);
if (path->device->serial_num != NULL) {
+ int start, slen;
+
+ start = strspn(serial_buf->serial_num, " ");
+ slen = serial_buf->length - start;
+ if (slen <= 0) {
+ /*
+ * SPC5r05 says that an all-space serial
+ * number means no product serial number
+ * is available
+ */
+ slen = 0;
+ }
memcpy(path->device->serial_num,
- serial_buf->serial_num,
- serial_buf->length);
- path->device->serial_num_len =
- serial_buf->length;
- path->device->serial_num[serial_buf->length]
- = '\0';
+ &serial_buf->serial_num[start], slen);
+ path->device->serial_num_len = slen;
+ path->device->serial_num[slen] = '\0';
}
} else if (cam_periph_error(done_ccb, 0,
SF_RETRY_UA|SF_NO_PRINT,
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Apr 29, 7:21 PM (13 h, 8 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
32381360
Default Alt Text
D6516.id17015.diff (1 KB)
Attached To
Mode
D6516: Strip leading spaces off of a SCSI disk's serial number
Attached
Detach File
Event Timeline
Log In to Comment