svn commit: r313252 - head/sbin/nvmecontrol
Warner Losh
imp at FreeBSD.org
Sat Feb 4 20:43:56 UTC 2017
Author: imp
Date: Sat Feb 4 20:43:54 2017
New Revision: 313252
URL: https://svnweb.freebsd.org/changeset/base/313252
Log:
Fix off by one error that truncated the serial number for filenames.
Modified:
head/sbin/nvmecontrol/wdc.c
Modified: head/sbin/nvmecontrol/wdc.c
==============================================================================
--- head/sbin/nvmecontrol/wdc.c Sat Feb 4 20:43:45 2017 (r313251)
+++ head/sbin/nvmecontrol/wdc.c Sat Feb 4 20:43:54 2017 (r313252)
@@ -94,7 +94,7 @@ wdc_append_serial_name(int fd, char *buf
walker = sn + NVME_SERIAL_NUMBER_LENGTH - 1;
while (walker > sn && *walker == ' ')
walker--;
- *walker = '\0';
+ *++walker = '\0';
snprintf(buf, len, "%s%s.bin", sn, suffix);
}
More information about the svn-src-all
mailing list