freebsd-dev/cddl
Andriy Gapon 65b5f7c743 MFV r323790: 8567 Inconsistent return value in zpool_read_label
illumos/illumos-gate@c861bfbd77
c861bfbd77

https://www.illumos.org/issues/8567
  If fstat64 fails, pread64 fails, or the label is unintelligible,
  zpool_read_label will return 0. But if malloc fails, it will return -1. For
  consistency, it should always return -1 on failure or 0 on success.

Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Alan Somers <asomers@gmail.com>

MFC after:	2 weeks
2017-09-20 07:23:50 +00:00
..
compat/opensolaris Honor all options of "zfs mount -o" 2017-09-05 19:28:35 +00:00
contrib/opensolaris MFV r323790: 8567 Inconsistent return value in zpool_read_label 2017-09-20 07:23:50 +00:00
lib Remove redundant source and object files. 2017-09-09 13:18:32 +00:00
sbin Convert traditional ${MK_TESTS} conditional idiom for including test 2017-08-02 08:35:51 +00:00
tests Merge ^/user/ngie/release-pkg-fix-tests to unbreak how test files are installed 2016-05-04 23:20:53 +00:00
usr.bin Convert traditional ${MK_TESTS} conditional idiom for including test 2017-08-02 08:35:51 +00:00
usr.sbin zfsd(8): Close a race condition when onlining a disk paritition 2017-08-24 19:48:41 +00:00
Makefile Convert traditional ${MK_TESTS} conditional idiom for including test 2017-08-02 08:35:51 +00:00
Makefile.inc Make DTrace stuff compile with C99 standard. 2014-08-22 20:04:51 +00:00