Fix off by one error that truncated the serial number for filenames.

This commit is contained in:
Warner Losh 2017-02-04 20:43:54 +00:00
parent dd8374eb70
commit 0fe4a5189c
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=313252

View File

@ -94,7 +94,7 @@ wdc_append_serial_name(int fd, char *buf, size_t len, const char *suffix)
walker = sn + NVME_SERIAL_NUMBER_LENGTH - 1;
while (walker > sn && *walker == ' ')
walker--;
*walker = '\0';
*++walker = '\0';
snprintf(buf, len, "%s%s.bin", sn, suffix);
}