$Id: ChangeLog 5338 2022-02-28 16:34:26Z chrfranke $

2022-02-28  Christian Franke  <franke@computer.org>

	smartmontools 7.3

2022-02-27  Douglas Gilbert  <dgilbert@interlog.com>

	scsicmds.cpp scsiprint.cpp and others: route all SCSI pass
	through calls in scsicmds.cpp via the renamed function:
	scsi_pass_through_yield_sense() which will absorb up to
	three pending Unit Attentions [see ticket 179]. Use
	aggregate initialization (e.g. 'uint8_t b[32] = {};') to
	bypass the need for many memset() calls.

2022-02-26  Douglas Gilbert  <dgilbert@interlog.com>

	ataprint.cpp: add suggestion when 'Read Device Identity
	failed: xxx' error generated to look at
	--device-type=TYPE variants. May help with USB-C connected
	NVMe enclosures (e.g. with M-2 modules inside)

2022-02-26  Christian Franke  <franke@computer.org>

	configure.ac: Print 'deprecated' warning for '--with-signal-func'.

2022-02-25  Douglas Gilbert  <dgilbert@interlog.com>

	NEWS: update for changes in previous commit

2022-02-25  Douglas Gilbert  <dgilbert@interlog.com>

	smartctl.cpp, scsiprint.cpp: extend --log=defects option so it
	works for the SCSI Pending Defects log page (similar to ATA log
	page of same name). Add --log=envrep option to output
	Environmental Reporting log page (e.g. temperature(s) and
	relative humidiy).  Add: --log=zdevstat option to output Zone
	block device statistics log page. Updated smartctl.8.in for the
	above changes. Ran 'spellintian * | grep -v duplica' on source
	using Ubuntu 20.04 LTS with Canadian English as the locale.
	Fixed reported spelling errors.

2022-02-23  Christian Franke  <franke@computer.org>

	configure.ac, update-smart-drivedb.*: Use RELEASE_7_3_DRIVEDB for
	drivedb.h updates.

	Create new branch RELEASE_7_3_DRIVEDB.

2022-02-22  Christian Franke  <franke@computer.org>

	os_win32/update-smart-drivedb.ps1.in: Set console encoding.
	Otherwise redirection to gpg occasionally starts with a BOM.

	os_win32/update-smart-drivedb.ps1.in: Unify path syntax.

	do_release: Update code signing key id.

	smartd.cpp: Ensure that '--warn-as-user=restricted' failure is
	visible in syslog.

	smartd.cpp: Add '-q *nodev0*' option variants.
	These change the exit status to 0 if there are no devices
	to monitor.
	smartd.8.in: Document new functionality.

2022-02-20  Douglas Gilbert  <dgilbert@interlog.com>

	smartctl.cpp, scsiprint.cpp: implement the change to
	TapeAlert handling documented in the previous commit.
	Add --log=tapealert option to explicitly fetch the
	Tape Alert log page. Tweak some tape-specific formatting.

2022-02-19  Douglas Gilbert  <dgilbert@interlog.com>

	smartctl.8.in: proposed change to TapeAlert handling. No code
	has changed, just the smartctl manpage. Please review. If
	rejected just reverse this commit.

2022-02-19  Christian Franke  <franke@computer.org>

	drivedb.h:
	- Phison Driven (OEM) SSDs: Remove duplicate options.
	- SK hynix SATA SSDs: S31 (#1517), SC210 *3AMNB*, SC300 *32MND*,
	  SC313 HFS*, SC401, SH920.
	- Western Digital Ultrastar DC HC530: WUH721414ALE604 (#1458).
	- Western Digital Ultrastar DC HC550: More variants (#1547).
	- Western Digital Ultrastar DC HC560 (#1548).
	- Western Digital Ultrastar DC HC650 (#1549).
	- Western Digital Red Pro: WD102KFBX (#1543).
	- Western Digital Gold: WD141KRYZ (#1433, #1470).

2022-02-18  Christian Franke  <franke@computer.org>

	Allow one to specify a separate install location for drivedb.h.
	This prevents that update-smart-drivedb overwrites the package
	installed file (Debian Bug 976696, Ubuntu Bug 1893202).

	configure.ac, Makefile.am: Add '--with-drivedbinstdir' option.
	update-smart-drivedb.in: Add '--install' option.
	update-smart-drivedb.8.in: Document new functionality.
	smartctl.8.in, smartd.8.in: Adjust path names.

2022-02-16  Douglas Gilbert  <dgilbert@interlog.com>

	smartctl.cpp: add new --log=tapedevstat to print out SCSI
	Tape (SSC) Device Statistics log page. '-a' does not include
	this log page, but '-x' does. May add new --log= option
	soon (probably 'tapealert' which must be invoked explicitly);
	manpage needs updating

2022-02-09  Alex Samorukov <samm@os2.kiev.ua>

	Remove cppcheck 2.7 warning as we are using it now on our CI builds

2022-02-02  Christian Franke  <franke@computer.org>

	update-smart-drivedb.in: Fix regexp quoting.

	os_linux.cpp: Enhance device scan range to '/dev/sdzz'.
	smartd.8.in: Update related documentation.

2022-02-01  Christian Franke  <franke@computer.org>

	autogen.sh: automake 1.16.3-5 work.

	os_win32/update-smart-drivedb.nsi: Remove, no longer used.
	Makefile.am: Remove related targets.

	os_win32/installer.nsi: Install update-smart-drivedb.ps1.
	Delete update-smart-drivedb.exe.  Remove outdated delete commands.

	os_win32/update-smart-drivedb.ps1.in: New drivedb.h update script.
	It verifies the downloaded drive database with GnuPG (#752).
	Makefile.am: Add new file.

2022-01-29  Douglas Gilbert  <dgilbert@interlog.com>

	scsiprint.cpp: fix issue with Zoned block device
	statistics lpage specific to the WDC DC HC650
	SAS ZBC disk. Visible with smartctl -x

2022-01-28  Douglas Gilbert  <dgilbert@interlog.com>

	scsicmds.cpp,scsiprint.cpp: the "Long (extended)
	Self-test duration" at the end of smartctl -a output
	comes from a 16 bit field holding seconds. If the
	value is 0xffff the spec now says to consult the
	Extended Inquiry VPD page which has a similar field
	but the unit is minutes. Tweak the output if the
	duration exceeds 14400 seconds: calculate hours
	in brackets [normally minutes]. Reason: my 20 TB
	disk reports 38.7 hours to do a long self-test!

2022-01-16  Douglas Gilbert  <dgilbert@interlog.com>

	scsiprint.cpp: my tape drive gives a nuisance TapeAlert
	warning after each power cycle. With '-xj' output this
	leads a JSON array with a lot of 'null' entries. Change
	the JSON indexing so it is compact and add a
	'descriptor_idx' attribute if the position is important
	to the end user. In the case of TapeAlert the relative
	position is the degree of seriousness. Change TapeAlert
	'code' name to 'parameter_code'.

2022-01-16  Douglas Gilbert  <dgilbert@interlog.com>

	scsiprint.cpp: small cleanup on (tape) device
	statistics lpage (plain and json)

2022-01-09  Douglas Gilbert  <dgilbert@interlog.com>

	scsiprint.cpp, add smartctl -x output (plain+json) for
	the (tape) device statistics lpage and the Zoned block
	device statistics lpage. Listed under -l background
	option (may need new option(s)).

2022-01-14  Alex Samorukov   <samm@os2.kiev.ua>

	drivedb.h: Add xerrorlba flag to the  WD Caviar Black (#1558) family
	smartd.service: add comment about virtualisation

2022-01-09  Douglas Gilbert  <dgilbert@interlog.com>

	scsiprint.cpp, scsicmds.h/.cpp: do some preliminary
	work to fetch the Zoned block device characteristics
	VPD page if it is present

2022-01-08  Douglas Gilbert  <dgilbert@interlog.com>

	scsiprint.cpp: adjust json::str2key() calls as requested

2022-01-08  Douglas Gilbert  <dgilbert@interlog.com>

	scsiprint.cpp: add json for the Start stop cycle counter
	log page. Rejig some of the other SCSI json. 

2022-01-07  Douglas Gilbert  <dgilbert@interlog.com>

	scsiprint.cpp: remove jsonify_name() and use
	json::str2key() where required. No user space
	visible changes.

2022-01-07  Alex Samorukov <samm@os2.kiev.ua>
	drivedb.h: 
	  - Add L3 EVO SSD (#1354)
	  - Add INTEL SSDSCKKF512G8 SATA 512GB (#1244)
	  - Extend regexp for the Sandisk SD9SB8W series (#1112)

2022-01-06  Christian Franke  <franke@computer.org>

	json.cpp, json.h: Allows one to use any string for object keys.
	Convert to final key with new public function 'json::str2key()'.
	Rename related variables from 'key' to 'keystr'.

2022-01-06  Alex Samorukov <samm@os2.kiev.ua>

	drivedb.h: 
	  - SanDisk SSD PLUS 2000GB/UP4504RL (#1503)
	  - Western Digital PiDrive Foundation Edition (#1007)
	  - Fixed Supermicro SATA DOM (SuperDOM) entry (#1380)
	  - Extended regexp to support WDC WD40NDZM-59A8KS1 (#1474)
	  - Seagate FreePlay HDD (#1405)

2022-01-05  Douglas Gilbert  <dgilbert@interlog.com>

	scsiprint.cpp: prefix most SCSI specific JSON
	top level names with 'scsi_'. Add SCSI self
	test JSON plus a few corrections.

2022-01-05  Alex Samorukov <samm@os2.kiev.ua>

	drivedb.h: add Lexar 128GB SSD (#1529)

2022-01-05  Douglas Gilbert  <dgilbert@interlog.com>

	scsiprint.cpp: first cut at adding json to the
	self-test log page.
	scsicmds.h/.cpp: add scsi_get_sense_key_str()
	helper to fetch SCSI sense key as a C string

2022-01-04  Douglas Gilbert  <dgilbert@interlog.com>

	scsiprint.cpp: printf() spotted in
	scsiPrintPendingDefectsLPage() by Yannick Hemery.
	Changed to jout().

2022-01-03  Douglas Gilbert  <dgilbert@interlog.com>

	utility.h: overload jsonify_name() to take a C
	string or a std::string. Use in scsiprint.cpp
	to add more json support.

2022-01-03  Christian Franke  <franke@computer.org>

	json.h: Allows one to use std::string for object keys.

2022-01-02  Douglas Gilbert  <dgilbert@interlog.com>

	utility.h: add free functions jsonify_name() and
	jsonify_name_s() to lessen the repetition of names
	that are very similar. May not save code but reduces
	the chance of naming errors. Use jsonify_name() in
	scsiprint.cpp as use of concept.

2022-01-01  Christian Franke  <franke@computer.org>

	Happy New Year!  Update copyright year in version info.

2022-01-01  Douglas Gilbert  <dgilbert@interlog.com>

	scsiprint.cpp: add more json support: SAS transport
	settings (partial) and some tape drive. Please review.

2021-12-29  Douglas Gilbert  <dgilbert@interlog.com>

	scsiprint.cpp: add more json support: logical_unit_id,
	protection_type and lb_provisioning

2021-12-29  Douglas Gilbert  <dgilbert@interlog.com>

	scsiprint.cpp: applied patch proposed by Yannick Hemery at:
	https://github.com/yhemery/smartmontools/commit/
	cf8462bbf395386c239ea587a26777f2de44f8d6 [note: that url has
	been line wrapped]. It is to cope with a Samsung SAS SSD that
	considers the "Supported log pages" log page [0x0,0x0] and 
	the "Supported log pages and subpages" log page [0x0,0xff]
	as two sub-inventories that must be merged (i.e. a set
	union) rather than [0x0,0xff] being a superset of [0x0,0x0].
	Samsung seems to be alone in that interpretation.

2021-12-21  Douglas Gilbert  <dgilbert@interlog.com>

	experimental: add support for printing the SCSI Environmental
	Reporting log (sub)page [0xd,0x1] via the -l scttemp option
	and select it when '-x' is given. Also generate json output.
	Outputs temperature and relative humidity current values and
	various min/max values. Manpage has not been updated as this
	may not be the best way to hook this in.

2021-12-21  Douglas Gilbert  <dgilbert@interlog.com>

	scsiprint.cpp: fix listing of subpages as proposed by Yannick
	Hemery <yannick.hemery@corp.ovh.com> in smt's github pull/122

2021-12-18  Christian Franke  <franke@computer.org>

	smartd.cpp: Windows: Add new option '--warn-as-user=restricted'.
	If specified, the warning script is run with a restricted access
	token.

	os_win32/popen_win32.cpp, os_win32/popen.h: Add new functions
	'popen_as_restr_user()' and 'popen_as_restr_check()' and a TEST
	program.

	smartd.8.in: Document new functionality.

2021-12-16  Christian Franke  <franke@computer.org>

	smartd.cpp: Add new option '--capabilities=mail'.
	It initializes the capability bounding set for the exim MTA.
	This is based on 'smartmontools-7.2-capnotify.patch' from the
	Fedora Package (Red Hat Bugzilla 1954015).

	No longer suppress mail notification if '--capabilities' is used.
	Log a related hint instead if the warning script fails.

	smartd.8.in: Document new functionality.

2021-12-15  Christian Franke  <franke@computer.org>

	smartd.cpp: Allow use of '--warn-as-user' with '--capabilities'.

2021-12-13  Christian Franke  <franke@computer.org>

	smartd.cpp: Add ability to run warning script as non-privileged user.
	User could be specified with new option '-u, --warn-as-user'.

	popen_as_ugid.cpp, popen_as_ugid.h: New files with popen() wrapper
	function.  It allows one to change uid/gid and also prevents that
	unneeded file descriptors are inherited by the child process.

	configure.ac, Makefile.am: Enable new functionality for all OS with
	POSIX API.

	smartd.8.in: Document new functionality.

2021-12-12  Christian Franke  <franke@computer.org>

	update-smart-drivedb.in: Add usage error messages, add '-h' option.

2021-12-11  Christian Franke  <franke@computer.org>

	update-smart-drivedb.in: Allow a directory in the argument of '-t'.

	update-smart-drivedb.in: Add missing long options.

	update-smart-drivedb.in: Allow update from local files or other URLs.
	Location could be specified with new options '--file' and '--url'
	(#1426).  Check VERSION information to prevent downgrades.
	Allow override with new option '--force'.
	update-smart-drivedb.8.in: Document new functionality.

	update-smart-drivedb.in: Rename some variables.

2021-11-29  Christian Franke  <franke@computer.org>

	smartctl.cpp: Fix possible buffer overflow (#1546).
	An overflow of 1-2 bytes occurred only if the '-n' option
	was specified with an invalid argument.

2021-11-28  Christian Franke  <franke@computer.org>

	smartd.cpp: Fix write of ATA attributes to state files.
	Regression from r5256.

2021-11-27  Christian Franke  <franke@computer.org>

	smartd.cpp: Don't write 'smartd -D' output to syslog on syntax error.

	smartd.cpp: Add ability to specify different check intervals (#336).
	The new directive '-c i=N, -c interval=N' overrides the command line
	option '-i N, --interval=N' for specific devices.
	smartd.8.in, smartd.conf.5.in: Document new directive.

	smartd.cpp: Use some C++11 features.

	smartd.cpp: Add missing 'CloseDevice()' after NVMe error.

2021-11-24  Alex Samorukov <samm@os2.kiev.ua>

	megaraid (Linux, FreeBSD): relax RAID matching for the LSI PERC RAID
	controller. Reported by alex@alexburke.ca.
	drivedb.h: add "PLEXTOR PX-512M8VC +" (GH #108)

2021-11-23  Alex Samorukov <samm@os2.kiev.ua>

	drivedb.h: extend Intel regexp to support S4520 (GH #112)

2021-11-22  Alex Samorukov <samm@os2.kiev.ua>

	os_freebsd.cpp: initial support of the direct MegaRaid access using
	'-d megaraid' option. Code is initially based on Linux version but adopted to
	be compatible with FreeBSD IOCTL-s.

2021-11-13  Christian Franke  <franke@computer.org>

	smartctl.8.in, smartd.8.in: Remove EXPERIMENTAL notes for features
	added before 7.1.

	smartd.cpp: Allow one to disable preconfigured state/log files with
	'-'. The previous method required to specify the '-s' and '-A' options
	with empty strings as arguments.  This does not work conjunction with
	shell variable expansion (GH issues/115).
	smartd.8.in: Document new option argument.

2021-11-08  Yannick Hemery  <yannick.hemery@corp.ovh.com>

	scsicmds.cpp: Retry on UNIT ATTENTION when fetching capacity (#1303).

	If a UNIT ATTENTION is raised when READ CAPACITY (16) is called,
	smartctl might wrongly assume that the drive only supports READ
	CAPACITY (10), and return an invalid drive size / block size as a
	result.

2021-11-06  Christian Franke  <franke@computer.org>

	update-smart-drivedb.in: Add '-q' option to suppress info messages.
	(GH issues/110).
	update-smart-drivedb.8.in: Document new option.

	update-smart-drivedb.in: Stop the gpg-agent started by gpg.
	Retry if removal of temp gpg home directory fails.
	This prevents dangling agents and temp directories on NFS (#1542).

2021-11-01  Christian Franke  <franke@computer.org>

	os_linux.cpp: Add missing permission bits to mknod() calls.
	This fixes access to '-d aacraid' and '-d megaraid' devices from
	smartd if '--capabilities' is used (GH issues/113).
	Thanks to Michal Hlavinka for finding the root of the problem.

2021-10-31  Christian Franke  <franke@computer.org>

	os_win32.cpp: Decode Windows 10, 11 and Server 2022 21H2 build
	numbers.

2021-10-23  Christian Franke  <franke@computer.org>

	Don't pass possible command escapes to the 'mail' command (#1535).

	The 'mail' command from GNU mailutils < 3.13 processes '~! COMMAND'
	even if used non-interactively (https://savannah.gnu.org/bugs/?60937).

	smartd.cpp: Sanitize device identify information which is passed to
	SMART_DEVICEINFO environment variable and written to syslog.

	smartd_warning.sh.in: Abort script if a message line begins with a
	possible command escape.

	Thanks to 0x3l leox14@protonmail.com for reporting this security issue.

2021-09-14  Christian Franke  <franke@computer.org>

	drivedb.h:
	- Silicon Motion based SSDs: Mushkin Source-II (#1509).
	- Western Digital Ultrastar DC HC550 (#1460).
	- Toshiba MG08ACA... Enterprise Capacity HDD: 14TB.
	- Toshiba N300/MN NAS HDD: Rename, add HDWG480,
	- Seagate BarraCuda 3.5 (SMR): Attribute 9.
	- Seagate IronWolf: Attribute 240.
	  MN series (#1510, #1511).
	- USB: LaCie d2 PROFESSIONAL (0x059f:0x10b8) (#1502).
	- USB: JMicron JMS576 (0x152d:0x0576) (#1428).

2021-09-04  Christian Franke  <franke@computer.org>

	os_win32.cpp: Disable broken aacraid support until #1515 is fixed.
	Print explanatory error message.  Add 'force' flag to try anyway.

2021-08-27  Christian Franke  <franke@computer.org>

	os_win32.cpp: aacraid: Fix crash on transfer size > 880 bytes (#1515).

2021-08-21  Christian Franke  <franke@computer.org>

	os_win32.cpp: Decode Windows 10 21H1 build number.

	configure.ac: Add '-Werror=return-type' if supported.
	G++ >= 8.0 assumes that control never reaches the end of a
	non-void function (GCC Bugzilla 96181).

2021-06-26  Christian Franke  <franke@computer.org>

	ataidentify.cpp, ataprint.cpp: ACS-5 enhancements.

	ataprint.cpp: Don't set bit 2 of exit status if ATA output registers
	are missing but attributes are available (#1441, GH issues/98).

2021-06-06  Christian Franke  <franke@computer.org>

	drivedb.h:
	- Crucial/Micron Client SSDs: MTFDDAK256TDL-* (#1490).
	- Innodisk 1IE3/3IE3/3ME3/3IE4/3ME4 SSDs: Rename, add 1IE3, 3IE4.
	- Samsung based SSDs: 870 EVO, 860 QVO (#1457),
	  883 DCT 1.92/3.84TB (#1452), CM871 MZ7LF192HCGS (#1475),
	  PM841 MZMTD128HAFV, PM851 MZNTE512HMJH (GH issues/87).
	- SSSTC ER2 GD/CD Series SSDs: *A variant (#1484).
	- Xmore Industrial SATA SSDs (based on patch from #1364).
	- Toshiba MG09ACA... Enterprise Capacity HDD.

2021-06-04  Christian Franke  <franke@computer.org>

	Rework 'get_timer_usec()', use a C++11 clock if possible.
	dev_interface.cpp, dev_interface.h, os_win32.cpp: Move function ...
	utility.cpp, utility.h: ... to here.
	configure.ac: Remove related checks.

	ataprint.cpp, nvmeprint.cpp: Add JSON values 'smart_support.*' to
	keep consistency with scsiprint.cpp.

2021-05-02  Douglas Gilbert  <dgilbert@interlog.com>

	scsiprint.cpp: continue JSON work

2021-04-14  Phillip Schichtel <phillip@schich.tel>

	os_linux.cpp: Only require '-d cciss,N' if hpsa devices are in
	RAID mode.

2021-04-09  Alex Samorukov <samm@os2.kiev.ua>

	os_openbsd.cpp: fix SAT autodetection for the sd* devices (#1467)

2021-03-24  Martin Ziemer  <horrad@horrad.de>

	os_openbsd.cpp: Apply conversion to seconds for timeouts in
	scsi_pass_through (#1466).

	os_openbsd.cpp: Use correct devicename for autodetection (#1465).

2021-03-08  Christian Franke  <franke@computer.org>

	drivedb.h:
	- Toshiba MG04ACA... Enterprise HDD: Rename, merge entries,
	  add *NY variant (GH issues/90).
	- Toshiba MG05ACA... Enterprise Capacity HDD (#1327).
	- Toshiba MG08ACA... Enterprise Capacity HDD.
	- Toshiba N300 NAS HDD (#1143, #1236, #1251, #1323).
	- Toshiba P300 (CMR): Rename.
	- Toshiba P300 (SMR) (#1430).
	- Toshiba X300: HDWF180 (#1277), 10-16TB.

2021-03-02  Christian Franke  <franke@computer.org>

	smartd_warning.sh.in: Fix handling of multiple email addresses
	in conjunction with plugin scripts (#1454).
	Pass modified SMARTD_ADDRESS also to all plugin scripts.
	Provide original value as SMARTD_ADDRESS_ORIG.
	Exit immediately if a script is missing.
	smartd.conf.5.in: Document error handling and SMARTD_ADDRESS_ORIG.

2021-02-14  Alex Samorukov  <samm@os2.kiev.ua>

	os_darwin.cpp: implement APM set feature, based on hdparm macOS sources

2021-02-09  Christian Franke  <franke@computer.org>

	configure.ac: Include required library functions in check for
	'-fstack-protector' (#1439).

	Print drive database version in smartctl and smartd.
	knowndrives.cpp, knowndrives.h: Parse VERSION string.
	ataprint.cpp: Print version.  Remove '-P showall' help string.
	smartd.cpp: Print version.

2021-02-07  Christian Franke  <franke@computer.org>

	Makefile.am: 'check' target now also checks the built-in database.

	smartctl.cpp: Fix 'optopt' range check
	(cppcheck 2.3: invalidFunctionArg).

	scsiprint.cpp: Silence cppcheck 2.3 'unreadVariable' warning.

	scsiata.cpp: Remove unused function 'has_usbcypress_pass_through()'.

	Improve reproducibility if SOURCE_DATE_EPOCH if set (GH pull/89).
	configure.ac: Define SOURCE_DATE_EPOCH in CPPFLAGS.
	utility.cpp: Print SOURCE_DATE_EPOCH value if specified.
	Don't include configure arguments then.
	cppcheck.sh: Silence related 'ConfigurationNotChecked' message.

	Always add timestamp to JSON output (#1436).
	Move non-JSON timestamp output to common function.

2021-02-01  Christian Franke  <franke@computer.org>

	Silence more cppcheck 2.3 warnings.

	Add C++11 'override' specifier where applicable (cppcheck: missingOverride).

	os_freebsd.cpp, os_linux.cpp: Replace deprecated bcopy() and bzero()
	(cppcheck: bcopyCalled, bzeroCalled).

	cppcheck.sh: Add '-c' option.
	Remove suppress: bcopyCalled, bzeroCalled, missingOverride.
	Mark cppcheck 1.86, 2.2 and 2.3 as tested.

	json.h: suppress cppcheck: noExplicitConstructor.

	ataprint.cpp, ataprint.h, smartctl.cpp: Optionally exit immediately
	if '-n POWERMODE' option is not supported (#1381).
	smartctl.8.in: Document new STATUS2 Parameter for '-n POWERMODE'.

2021-01-27  Christian Franke  <franke@computer.org>

	json.cpp, json.h: Add support for nested braced-init-lists.

	json.cpp, json.h: Use some C++11 features.  Align output functions.

2021-01-24  Christian Franke  <franke@computer.org>

	ataprint.h, nvmeprint.h, scsiprint.h: Use C++11 in-class member
	initializers.

	Drop C++98 restriction, allow C++11.
	configure.ac: Enable C++11.  Fail if no option found.
	Disable C++14 if possible.  Warn if no C++14 option found.

	configure.ac: Remove defunct '--with-working-snprintf'.

	scsiprint.cpp: Reduce scope of 'powerlimit'
	(cppcheck 1.85: variableScope).

2021-01-24  Simon Fairweather  <simon.n.fairweather@gmail.com>

	scsiprint.cpp: Move VPD page process to after new powermode processing
	added in r5131 to resolve #1413 of Seagate drives spinning up when
	-n standby is selected.  Simplify code for VPD pages.

2021-01-23  Christian Franke  <franke@computer.org>

	Makefile.am: Enhance config-vc and *clean-vc targets for MSVC15/16.

	os_win32/vc16: Copy from vc15 and change for MSVC16 (VS2019).

	os_win32/vc15: Copy from vc14 and change for MSVC15 (VS2017).

	os_win32/vc14/smart*.vcxproj*: Add missing files.
	Suppress warnings for regex/regex.c.

2021-01-20  Christian Franke  <franke@computer.org>

	ataprint.cpp, ataprint.h, smartctl.cpp: Rework sct_erc variables.
	Fix handling of '-l scterc*,p' if both get and set are used.

	smartctl.cpp: Change '-l scterc,r' to '-l scterc,reset'.
	Make ',p' case sensitive.  Simplify parsing of 'scterc...'.
	smartctl.8.in: Change documentation accordingly.

2021-01-17  Christian Franke  <franke@computer.org>

	drivedb.h:
	- Bump branch VERSION to 7.3.
	- USB: Realtek RTL9211 (0x0bda:0x9211, 0x2eb9:0x9211).
	- USB: ASMedia ASM2362 (0x174c:0x2362).

	scsinvme.cpp: Add '-d sntasmedia' device type for ASMedia ASM2362
	USB to NVMe bridges (#1221).
	dev_interface.cpp: Update help text.
	smartctl.8.in, smartd.conf.5.in: Document new option.

	Thanks to Demian from Sabrent.

2021-01-15  Christian Franke  <franke@computer.org>

	smartctl.8.in: Add EXPERIMENTAL note for new '-l scterc' variants.

2021-01-15  Jeremy Bauer  <jeremy.bauer@wdc.com>

	Add support for SCT Error Recovery Timer features added in ACS-4
	(#1427).
	'-l scterc[,R,W],p' option gets/sets the persistent power-on values.
	'-l scterc,r' option restores to the manufacturer's default values.

2021-01-15  Zhenwei Pi  <pizhenwei@bytedance.com>

	nvmeprint.cpp: Add bit 5 of SMART/Health 'Critical Warning' byte
	(NVMe 1.4).

2021-01-10  Christian Franke  <franke@computer.org>

	drivedb.h: Add VERSION information to trunk and all branches (#1424).

2021-01-06  Christian Franke  <franke@computer.org>

	drivedb.h:
	- Seagate BarraCuda 3.5: Split into ...(CMR) and ...(SMR).
	- Seagate Exos 7E8 (#1415).
	- Western Digital Blue (SMR): 4TB.
	- USB: ADATA HV610 (0x125f:0xa21a) (#1417).

2021-01-01  Christian Franke  <franke@computer.org>

	Happy New Year!  Update copyright year in version info.

2020-12-30  Christian Franke  <franke@computer.org>

	smartmontools 7.2

2020-12-30  Christian Franke  <franke@computer.org>

	configure.ac, update-smart-drivedb.in: Use RELEASE_7_2_DRIVEDB for
	drivedb.h updates.

	Create new branch RELEASE_7_2_DRIVEDB.

2020-12-29  Christian Franke  <franke@computer.org>

	drivedb.h:
	- Micron 5100 Pro / 52x0 / 5300 SSDs: 5300HC.
	- Samsung based SSDs: PM871 MZY* (#1384), 870 QVO (#1388).
	- Silicon Motion based SSDs: ADATA IMSS332 (#1399),
	  ADATA SU650NS38 (#1386), JAJS600M1TB (#1414), NFN025SA31T.
	- Silicon Motion based OEM SSDs: Dogfish,
	  Intenso portable (GH issues/81, GH pull/82),
	  Intenso Sata III (#1412), KingDian S280 (#1402).
	- SK hynix SATA SSDs: SC300 (#1407).
	- Hitachi Travelstar 5K500.B: *SA02 (#1408).
	- Fix '-v' comments.  Remove trailing whitespace.

	scsinvme.cpp: Realtek: Limit NVMe log transfer size to 512 bytes.

2020-12-21  Christian Franke  <franke@computer.org>

	smartctl.8.in: Add EXPERIMENTAL notes for SCSI variants of
	'-n POWERMODE' and '-s standby,...'.  Fix syntax.

	update-smart-drivedb.in: Add 'Accept-Encoding' HTTP header when
	curl is used.  This avoids caching problems with svn URL.

	update-smart-drivedb.in: Print output of 'gpg --import' if '-v' is
	specified.

	update-smart-drivedb.in: Extend expiration year of current database
	signing key from 2020 to 2025 (#1278).

2020-12-20  Christian Franke  <franke@computer.org>

	configure.ac: Use AC_CONFIG_HEADERS instead of obsolete
	AC_CONFIG_HEADER.  This silences a warning from new autoconf 2.70.
	Print 'deprecated' warning for '--with-solaris-sparc-ata'.

	drivedb.h:
	- Intel X25-E SSDs: IBM OEM (#1401).
	- Seagate BarraCuda 3.5: 12TB
	- Seagate Exos X16: 10TB (#1406, GH issues/63), 12TB.
	- Seagate Archive HDD: Rename to ...(SMR) (#1392).
	- Seagate BarraCuda, Enterprise Capacity, Exos, IronWolf:
	  Add attributes 18, 200.
	- Seagate IronWolf Pro 125 SSDs (#1396).
	- Unify indentation.

2020-12-15  Douglas Gilbert  <dgilbert@interlog.com>

	smartctl: expand -s option with standby,now and standby,off (or
	standby,0) to include SCSI. Modified code from Simon Fairweather
	found in github pull #72. As per my 20201205 patch, this
	area (i.e. SCSI power conditions including START and STOP) needs
	to be revisited; leave that until after the 7.2 release.

2020-12-14  Alex Samorukov  <samm@os2.kiev.ua>

	drivedb.h: add Sony HD-E1B (#1410)

2020-12-12  Alex Samorukov  <samm@os2.kiev.ua>

	Add automake 1.16.2 to the list of tested versions
	os_freebsd.cpp: number of minor patches from Christian Franke

2020-12-05  Douglas Gilbert  <dgilbert@interlog.com>

	smartctl: expand -n option to include SCSI. Code from Simon
	Fairweather. Still thinking about how to handle SCSI "stopped"
	state which requires the user to send a SCSI command to restart.

2020-12-04  Christian Franke  <franke@computer.org>

	nvmeprint.cpp: Print Log Page Attributes.  Print NVMe 1.4 features.

	nvmecmds.cpp, nvmecmds.h, nvmeprint.cpp: Fix check for LPO support.

2020-12-03  Christian Franke  <franke@computer.org>

	nvmeprint.cpp: Print NVMe version.

	nvmecmds.cpp, nvmecmds.h, nvmeprint.cpp: Limit NVMe log transfer size
	to one page.  This should fix device or kernel crashes on '-l error'
	if log has more than 64 entries (#1404, Debian Bug 947803).

	nvmeprint.cpp: Read only requested number of entries from NVMe
	Error Information Log.

2020-11-23  Christian Franke  <franke@computer.org>

	smartd.cpp: Allow one to specify a delay limit for staggered
	self-tests.
	smartd.conf.5.in: Document new functionality.

2020-11-21  Christian Franke  <franke@computer.org>

	smartd.cpp: Add staggered self-tests (#310).
	smartd.conf.5.in: Document new functionality.

2020-11-17  Dmitriy Potapov <atomsk+oss@google.com>

	smartd.cpp: Don't write attrlog when device is skipped due to idle or
	standby mode, or if attributes were not read for any other reason
	(GH pull/75).

2020-11-09  Christian Franke  <franke@computer.org>

	smartd.cpp: Resolve symlinks before device names are checked for
	duplicates (#1390).
	dev_interface.cpp, dev_interface.h: Add 'get_unique_dev_name()'
	and 'is_raid_dev_type()' to support platform specific modifications.
	smartd.conf.5.in: Document new functionality.

2020-11-07  Christian Franke  <franke@computer.org>

	json.cpp, json.h: Add YAML support.
	smartctl.cpp: Add '--json=y' option.
	smartctl.8.in: Document new option.

	smartctl.8.in, smartd.conf.5.in: Remove EXPERIMENTAL notes for
	features added before 7.0.
	update-smart-drivedb.8.in: Add missing EXPERIMENTAL note.

2020-11-01  Christian Franke  <franke@computer.org>

	drivedb.h:
	- Phison Driven SSDs: KINGSTON OM4P0S3* (#1374), OMSP0S3* (#1375).
	- InnoDisk iCF 9000 / 1SE2 Cards: Rename entry. Add 1SE2 H (#1351).
	- Marvell based SanDisk SSDs: 2TB SDSSDH3 (GH issues/67, GH pull/69),
	  WD Blue SSD WDS100T2B0A (#1378).
	- SanDisk based SSDs: SDSA6GM*.
	- Toshiba 2.5" HDD MK..76GSX/GS001A (GH pull/58).
	- Toshiba L200 (CMR), Toshiba L200 (SMR) (#1228, patch from #1377).
	- Western Digital Blue: Apple OEM (#1385).
	- Western Digital Scorpio Blue Serial ATA: 320 GB (patch from #888).

	os_win32.cpp: Decode Windows 10 20H2 and Server 2004, 20H2
	build numbers.

2020-10-29  Alex Samorukov  <samm@os2.kiev.ua>

	os_freebsd.cpp: skip SCSI subenclosure devices on scan (#1299)

2020-10-24  Christian Franke  <franke@computer.org>

	drivedb.h:
	- HGST Travelstar Z5K1000: *B*610 variant.
	- Hitachi Travelstar 7K320: HITACHI*SA60 variant (#983).
	- Hitachi/HGST Deskstar 5K4000: Rename entry. Add HGST (#1060).
	- HGST Deskstar NAS: 8TB.
	- Hitachi/HGST Ultrastar 5K3000 (#1055).
	- Hitachi Ultrastar 7K3000: Variant without vendor name (#1361).
	- Hitachi/HGST Ultrastar 7K4000: Variant without vendor name (#1361).
	- HGST Ultrastar HC310/320 (#1157, #1365).

2020-10-19  Christian Franke  <franke@computer.org>

	drivedb.h:
	- ATP SATA III aMLC M.2 2242 SSD (based on patch from #1366).
	- Silicon Motion based OEM SSDs: TCSUNBOW X3 (#1349),
	  KingDian S370 (#1350), LDLC (#1353), Lenovo.
	- SSSTC ER2 GD/CD Series SSDs (based on patch from #1376).

2020-10-15  Christian Franke  <franke@computer.org>

	drivedb.h:
	- Apacer SSDs (based on patch from #1202).
	- Crucial/Micron MX500 SSDs (FW <= M3CR032): Remove entry (#1227).
	- Crucial/Micron Client SSDs: Rename entry. Fix name of attribute 127.
	  This prevents false 'Currently unreadable (pending) sectors' warnings
	  from smartd (#1227, #1294, #1311, #1336).
	- Intel 730 and DC S35x0/3610/3700 Series SSDs: *H* variant (#1363).
	- Samsung based SSDs: 883 DCT (#1373).

	os_win32.cpp: Fix removal of trailing blanks.
	Silence misleading -Wstring-compare warning from g++ 10.2.0
	(GCC Bugzilla 97336).

2020-10-09  Christian Franke  <franke@computer.org>

	scsiprint.cpp: Don't print 'Accumulated power on time' if no
	option is specified (GH issues/65, regression from r5075).
	Fix setting of 'any_output' (regression from r4188).

	Based on patch from GH pull/66.

2020-10-06  Christian Franke  <franke@computer.org>

	Remove all occurrences of the throw() specifier.
	This specifier is deprecated since C++11.

2020-09-27  Christian Franke  <franke@computer.org>

	update-smart-drivedb.in: Add '--branch' option.
	Select signing key accordingly.
	update-smart-drivedb.8.in: Document new option.

2020-09-20  Christian Franke  <franke@computer.org>

	drivedb.h:
	- Crucial/Micron BX/MX1/2/3/500, M5/600, 11/1300 SSDs: BX500 2TB,
	  1100 with version suffix (#1178), 1300 without prefix (#1369).
	- Micron 5100 Pro / 52x0 / 5300 SSDs: Add attribute 246.
	- Phison Driven SSDs: Kingston A400 M.2 (#1362),
	  Kingston OCP0S3* (#1370), Kingston OM8P0* (#1371).
	- Kingston SSDNow UV400/500: UV500 M.2 (#1347).
	- SAMSUNG SpinPoint N3U-3 (USB): Rename.
	- USB: Samsung S1 Mini (0x04e8:0x2f06) (Debian Bug 964032).

2020-09-19  Christian Franke  <franke@computer.org>

	ataprint.cpp: Report unavailable TRIM command only for SSDs.

2020-08-23  Christian Franke  <franke@computer.org>

	drivedb.h: DEFAULT entry: Limit attribute 231 (Temperature_Celsius)
	to HDDs.  Various SSDs use this attribute for a different purpose.

	drivedb.h:
	- Micron 5100 Pro / 52x0 / 5300 SSDs: Rename, add 5210 (#1356),
	  5300 *TDT variant (#1355)
	- Phison Driven SSDs: SSD Smartbuy 64GB and other sizes (#1359)
	- Indilinx Barefoot_2/Everest/Martini based SSDs: OCZ-OCTANE (#1360)
	- Marvell based SanDisk SSDs: Ultra 3D 4TB (#1358)
	- Silicon Motion based SSDs: ACPI SED2QII-LP, Transcend 230
	- Western Digital Gold: WD102KRYZ (#1357)

2020-08-22  Christian Franke  <franke@computer.org>

	smartd.service.in: Don't start smartd in virtualized environments
	(GH issues/62).

2020-08-22  Marko Hauptvogel  <marko.hauptvogel@googlemail.com>

	smartd.service.in: Remove obsolete 'StandardOutput=syslog'.

2020-07-11  Christian Franke  <franke@computer.org>

	scsiprint.cpp: Add JSON values 'power_on_time.{hours,minutes}' to
	'smartctl -a' output.  Add missing pout() -> jout() replacements.

2020-07-10  Douglas Gilbert  <dgilbert@interlog.com>

	scsiprint.cpp: Add "Accumulated power on time" entry to
	  'smartctl -a' output. Previously this was only output
	  when the '-x' option was given, together with other
	  fields in the Background scan results log page. Now
	  with the '-a' option "Accumulated power on time" is
	  printed just before the "Manufactured in week ..." line.

2020-07-06  Douglas Gilbert  <dgilbert@interlog.com>

	scsiprint.cpp: Attempted fix to tickets 1272, 1331 and 1346
	  The difficulty is handling SCSI log _sub_-pages that hold
	  info about SSDs and newer hard drives, against older 
	  devices (20 year old disks?) that do many and varied
	  things when asked to list supported sub-pages. Add a
	  heuristic and change some naming.

2020-06-24  Alex Samorukov  <samm@os2.kiev.ua>

	os_darwin.cpp: Fix NVMe log support, handle error codes,
	  remove SMARTReadData call
	os_darwin.h: Cleanup, remove all private functions

2020-06-23  Harry Mallon  <hjmallon@gmail.com>

	os_darwin.cpp, os_darwin.h: Add support for NVMe logs.
	smartctl.8.in: Update related documentation.

2020-06-20  Christian Franke  <franke@computer.org>

	drivedb.h:
	- Crucial/Micron BX/MX1/2/3/500, M5/600, 11/1300 SSDs: Rename,
	  add 1300
	- Plextor M3/M5/M6/M7 Series SSDs: Rename, *M6G variant, *M7CV (#991)
	- Silicon Motion based SSDs: ADATA SU650 (#1243), ADATA SU655
	- Seagate IronWolf Pro: 16TB (#1341)
	- USB: Toshiba (0x0930:0xa002)
	- USB: ADATA HD330 (0x125f:0xa83a)
	- USB: AkiTio NT2 (0x2ce5:0x0014)

	os_solaris.cpp: Suggest '-d sat' if '-d ata' is specified.

