zfs: ZFSListFilesystemVersions: remove handling of io.ErrUnexpectedEOF

ZFSListChan returns (*DatasetDoesNotExist) for the case mentioned in the comment
This commit is contained in:
Christian Schwarz 2020-05-20 13:09:47 +02:00
parent 728e97700f
commit 175ad1dd0b

View File

@ -4,7 +4,6 @@ import (
"bytes" "bytes"
"context" "context"
"fmt" "fmt"
"io"
"strconv" "strconv"
"strings" "strings"
"time" "time"
@ -231,10 +230,6 @@ func ZFSListFilesystemVersions(ctx context.Context, fs *DatasetPath, options Lis
res = make([]FilesystemVersion, 0) res = make([]FilesystemVersion, 0)
for listResult := range listResults { for listResult := range listResults {
if listResult.Err != nil { if listResult.Err != nil {
if listResult.Err == io.ErrUnexpectedEOF {
// Since we specified the fs on the command line, we'll treat this like the filesystem doesn't exist
return []FilesystemVersion{}, nil
}
return nil, listResult.Err return nil, listResult.Err
} }