svn commit: r214404 - head/sbin/geom/class/eli

Pawel Jakub Dawidek pjd at FreeBSD.org
Tue Oct 26 22:46:16 UTC 2010


Author: pjd
Date: Tue Oct 26 22:46:15 2010
New Revision: 214404
URL: http://svn.freebsd.org/changeset/base/214404

Log:
  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

Modified:
  head/sbin/geom/class/eli/geom_eli.c

Modified: head/sbin/geom/class/eli/geom_eli.c
==============================================================================
--- head/sbin/geom/class/eli/geom_eli.c	Tue Oct 26 21:24:14 2010	(r214403)
+++ head/sbin/geom/class/eli/geom_eli.c	Tue Oct 26 22:46:15 2010	(r214404)
@@ -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;
 	}


More information about the svn-src-all mailing list