Use fprintf(stderr) instead of gctl_error() to print a warning about too

big sector size. When gctl error is set gctl_has_param() always returns
'false', which prevents geli(8) from finding some arguments and also masks
an error, which is generates in such case.

MFC after:	3 days
This commit is contained in:
Pawel Jakub Dawidek 2010-10-26 22:46:15 +00:00
parent 66f369d023
commit 240dd5b5aa

View File

@ -749,8 +749,8 @@ eli_init(struct gctl_req *req)
return;
}
if (val > sysconf(_SC_PAGE_SIZE)) {
gctl_error(req, "warning: Using sectorsize bigger than "
"the page size!");
fprintf(stderr,
"warning: Using sectorsize bigger than the page size!\n");
}
md.md_sectorsize = val;
}