RainbowHackerHorse / vzvol

vzvol is a general use ZFS zvol management tool, that handles creation, destruction, listing, and formatting with various FSes, in an easy to use single program
BSD 2-Clause "Simplified" License
31 stars 5 forks source link

FreeBSD 11.1: check for no-zvols fails #21

Closed adriaandegroot closed 6 years ago

adriaandegroot commented 6 years ago

On FreeBSD 11.1, the message "no datasets available" from zfs list -t volume goes to stdout, not stderr, so the check in vzvol_pre_list will never detect that error message, and always returns 0 -- which leads to funny results in vzvol_list.

RainbowHackerHorse commented 6 years ago

Yeah, I noticed that it will print my error message, but column it instead. It's not really a big issue, just a bit weird visually. Still, it deserves to be fixed and I'll dig into it later.

RainbowHackerHorse commented 6 years ago

Looking back into zfs, I see why I did things the way I did. Currently, zfs list will print errors right to the screen, no bones about it, with no way to actually dig into what it's printing. To top it off, it still returns 0. I had to do a hacky workaround to get it to do anything. Unfortunately I screwed up that workaround. New branch should fix, I'm testing it now :)

RainbowHackerHorse commented 6 years ago

resolved.