lzc_snapshot() produces inconsistent errlist for different errors
It seems that errlist is inconsistently populated by lzc_snapshot() depending on what problems are encountered.
On the one hand, if I try to create a set of snapshots and some of them already exist, then lzc_snapshot fails and errlist would be correctly populated with the already exisiting snapshots and EEXIST error code.
On the other hand, if I try to create a set of snapshots and some of them (but not all!) refer to filesystems that do not exist, then lzc_snapshot fails with ENOENT but the errlist is not populated. Thus it is impossible to correctly diagnose the failure.
Updated by Andriy Gapon about 6 years ago
A more elaborate example. lzc_snapshot() is called to create 3 snapshots: one already exists, one is for a nonexistent filesystem and one could have been successful.
In this case the overall error code is EEXIST and errlist has a single entry for the duplicate snapshot.
The attempt to create the snapshot for nonexistent filesystem is not reported.