Inconsistent return value in zpool_read_label
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.
Updated by Electric Monk about 2 years ago
- % Done changed from 0 to 100
- Status changed from New to Closed
commit c861bfbd77c4ae780a0341e9cb6926d8b74341cf Author: Alan Somers <firstname.lastname@example.org> Date: 2017-09-15T16:32:54.000Z 8567 Inconsistent return value in zpool_read_label Reviewed by: Prakash Surya <email@example.com> Reviewed by: Matthew Ahrens <firstname.lastname@example.org> Approved by: Robert Mustacchi <email@example.com>