Project

General

Profile

Actions

Bug #8567

closed

Inconsistent return value in zpool_read_label

Added by Alan Somers about 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 #1

Updated by Electric Monk about 6 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

git commit c861bfbd77c4ae780a0341e9cb6926d8b74341cf

commit  c861bfbd77c4ae780a0341e9cb6926d8b74341cf
Author: Alan Somers <asomers@gmail.com>
Date:   2017-09-15T16:32:54.000Z

    8567 Inconsistent return value in zpool_read_label
    Reviewed by: Prakash Surya <prakash.surya@delphix.com>
    Reviewed by: Matthew Ahrens <mahrens@delphix.com>
    Approved by: Robert Mustacchi <rm@joyent.com>

Actions

Also available in: Atom PDF