@@ 193,14 193,16 @@ int main(int argc, char * const * argv) {
if(!mtab && MTAB2)
mtab = {MTAB2, "re"};
if(!mtab)
- return std::fprintf(stderr, "%s: %s%s%s: %s\n", argv[0], MTAB, MTAB2 ? ", " : "", MTAB2 ?: "", std::strerror(errno)), 1;
+ std::fprintf(stderr, "%s: %s%s%s: %s\n", argv[0], MTAB, MTAB2 ? ", " : "", MTAB2 ?: "", std::strerror(errno));
+ else {
#if __sun
- for(mnttab mt; !getmntent(mtab, &me);)
- mtab_entries.emplace_back(entry{me.mnt_special, me.mnt_mountp, me.mnt_fstype});
+ for(mnttab mt; !getmntent(mtab, &me);)
+ mtab_entries.emplace_back(entry{me.mnt_special, me.mnt_mountp, me.mnt_fstype});
#else
- while(auto me = getmntent(mtab))
- mtab_entries.emplace_back(entry{me->mnt_fsname, me->mnt_dir, me->mnt_type});
+ while(auto me = getmntent(mtab))
+ mtab_entries.emplace_back(entry{me->mnt_fsname, me->mnt_dir, me->mnt_type});
#endif
+ }
}
#else
{