Date: Thu, 1 Feb 2018 19:39:00 +0000 (UTC) From: Alexander Motin <mav@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r328718 - stable/11/sbin/nvmecontrol Message-ID: <201802011939.w11Jd0fQ026399@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mav Date: Thu Feb 1 19:39:00 2018 New Revision: 328718 URL: https://svnweb.freebsd.org/changeset/base/328718 Log: MFC r313252 (by imp): Fix off by one error that truncated the serial number for filenames. Modified: stable/11/sbin/nvmecontrol/wdc.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sbin/nvmecontrol/wdc.c ============================================================================== --- stable/11/sbin/nvmecontrol/wdc.c Thu Feb 1 19:38:29 2018 (r328717) +++ stable/11/sbin/nvmecontrol/wdc.c Thu Feb 1 19:39:00 2018 (r328718) @@ -94,7 +94,7 @@ wdc_append_serial_name(int fd, char *buf, size_t len, walker = sn + NVME_SERIAL_NUMBER_LENGTH - 1; while (walker > sn && *walker == ' ') walker--; - *walker = '\0'; + *++walker = '\0'; snprintf(buf, len, "%s%s.bin", sn, suffix); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201802011939.w11Jd0fQ026399>