Commit Graph

5 Commits

Author SHA1 Message Date
Pawel Jakub Dawidek
f13942a746 - The geom(8) utility only uses three types of arguments: string (char *),
value (intmax_t) and boolean (int).
  Based on that provide three functions:
        - gctl_get_ascii()
        - gctl_get_int()
        - gctl_get_intmax()
- Hide gctl_get_param() function, as it is only used internally in
  subr.c.
- Allow to provide argument name as (fmt, ...).
- Assert geom(8) bugs (missing argument is a geom(8) bug).

- Clean-up and simplify the code by using new functions and assumtions
  (no more checking for missing argument).

Tested by:	regression tests
2005-12-07 01:38:27 +00:00
Pawel Jakub Dawidek
829781048d Move function for calculating number of bits into more central place.
I want to use it so more.

MFC after:	3 days
2005-08-19 22:13:09 +00:00
Pawel Jakub Dawidek
10fa0ebe1f MFp4: gmirror(8) is coming soon, and we need g_metadata_read() there. 2004-07-05 02:06:44 +00:00
Pawel Jakub Dawidek
09cc9ab63d Implement 3 new functions:
- g_lcm() - calculates Least Common Multiple of two given values,
		it is helpful when we need to find sector size for provider
		which is based on disks with different sector size;
	- g_get_mediasize() - returns media size of given provider;
	- g_get_sectorsize() - returns sector size of given provider;
Those function aren't used now, but are used by geom_mirror which will be
committed soon.
2004-06-16 10:44:26 +00:00
Pawel Jakub Dawidek
05c9107607 Bring in geom(8) utility. It is an universal utility for operating on
GEOM classes. It works by loading a shared library via dlopen(3) mechanism
with class-specific code, it is also responsible for communicating with
GEOM via libgeom(3).
Per-class shared libraries are going to be stored in /lib/geom/ directory.
It provides also few standard commands like 'list', 'load' and 'unload'
for existing classes which aren't aware of geom(8).
More info will be send on freebsd-current@ mailing list.

Supported by:	Wheel - Open Technologies - http://www.wheel.pl
2004-05-20 10:09:56 +00:00