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