Project

General

Profile

Actions

Bug #8567

closed

Inconsistent return value in zpool_read_label

Added by Alan Somers over 6 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Low
Assignee:
Category:
-
Start date:
2017-08-07
Due date:
% Done:

100%

Estimated time:
Difficulty:
Bite-size
Tags:
needs-triage
Gerrit CR:
External Bug:

Description

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.

Actions

Also available in: Atom PDF