Commit Graph

30 Commits

Author SHA1 Message Date
Simon J. Gerraty
ccfb965433 Add META_MODE support.
Off by default, build behaves normally.
WITH_META_MODE we get auto objdir creation, the ability to
start build from anywhere in the tree.

Still need to add real targets under targets/ to build packages.

Differential Revision:       D2796
Reviewed by: brooks imp
2015-06-13 19:20:56 +00:00
Simon J. Gerraty
44d314f704 dirdeps.mk now sets DEP_RELDIR 2015-06-08 23:35:17 +00:00
Simon J. Gerraty
98e0ffaefb Merge sync of head 2015-05-27 01:19:58 +00:00
Baptiste Daroussin
c6db8143ed Convert usr.sbin to LIBADD
Reduce overlinking
2014-11-25 16:57:27 +00:00
Simon J. Gerraty
fae50821ae Updated dependencies 2014-05-16 14:09:51 +00:00
Simon J. Gerraty
76b28ad6ab Updated dependencies 2014-05-10 05:16:28 +00:00
Simon J. Gerraty
7cf3a1c6b2 Updated dependencies 2013-03-11 17:21:52 +00:00
Simon J. Gerraty
f5f7c05209 Updated dependencies 2013-02-16 01:23:54 +00:00
Simon J. Gerraty
23090366f7 Sync from head 2012-11-04 02:52:03 +00:00
Eitan Adler
db702c59cf remove duplicate semicolons where possible.
Approved by:	cperciva
MFC after:	1 week
2012-10-22 03:00:37 +00:00
Marcel Moolenaar
7750ad47a9 Sync FreeBSD's bmake branch with Juniper's internal bmake branch.
Requested by: Simon Gerraty <sjg@juniper.net>
2012-08-22 19:25:57 +00:00
Edward Tomasz Napierala
6b381ff332 Improve error reporting in diskinfo(8) by not displaying errno when
it doesn't make sense.
2012-03-09 18:34:14 +00:00
Alexander Motin
23454425b7 Fix diskinfo -t operation for disks smaller then 8GB or bigger then 2TB.
Tested to work with 1.44MB floppy, 4GB USB stick and 4TB disk array.

Approved by:	re (kib)
2011-07-21 19:39:40 +00:00
Justin T. Gibbs
416494d7c9 Plumb device physical path reporting from CAM devices, through GEOM and
DEVFS, and make it accessible via the diskinfo utility.

Extend GEOM's generic attribute query mechanism into generic disk consumers.
sys/geom/geom_disk.c:
sys/geom/geom_disk.h:
sys/cam/scsi/scsi_da.c:
sys/cam/ata/ata_da.c:
	- Allow disk providers to implement a new method which can override
	  the default BIO_GETATTR response, d_getattr(struct bio *).  This
	  function returns -1 if not handled, otherwise it returns 0 or an
	  errno to be passed to g_io_deliver().

sys/cam/scsi/scsi_da.c:
sys/cam/ata/ata_da.c:
	- Don't copy the serial number to dp->d_ident anymore, as the CAM XPT
	  is now responsible for returning this information via
	  d_getattr()->(a)dagetattr()->xpt_getatr().

sys/geom/geom_dev.c:
	- Implement a new ioctl, DIOCGPHYSPATH, which returns the GEOM
	  attribute "GEOM::physpath", if possible.  If the attribute request
	  returns a zero-length string, ENOENT is returned.

usr.sbin/diskinfo/diskinfo.c:
	- If the DIOCGPHYSPATH ioctl is successful, report physical path
	  data when diskinfo is executed with the '-v' option.

Submitted by:	will
Reviewed by:	gibbs
Sponsored by:	Spectra Logic Corporation

Add generic attribute change notification support to GEOM.

sys/sys/geom/geom.h:
	Add a new attrchanged method field to both g_class
	and g_geom.

sys/sys/geom/geom.h:
sys/geom/geom_event.c:
	- Provide the g_attr_changed() function that providers
	  can use to advertise attribute changes.
	- Perform delivery of attribute change notifications
	  from a thread context via the standard GEOM event
	  mechanism.

sys/geom/geom_subr.c:
	Inherit the attrchanged method from class to geom (class instance).

sys/geom/geom_disk.c:
	Provide disk_attr_changed() to provide g_attr_changed() access
	to consumers of the disk API.

sys/cam/scsi/scsi_pass.c:
sys/cam/scsi/scsi_da.c:
sys/geom/geom_dev.c:
sys/geom/geom_disk.c:
	Use attribute changed events to track updates to physical path
	information.

sys/cam/scsi/scsi_da.c:
	Add AC_ADVINFO_CHANGED to the registered asynchronous CAM
	events for this driver.  When this event occurs, and
	the updated buffer type references our physical path
	attribute, emit a GEOM attribute changed event via the
	disk_attr_changed() API.

sys/cam/scsi/scsi_pass.c:
	Add AC_ADVINFO_CHANGED to the registered asynchronous CAM
	events for this driver.  When this event occurs, update
	the physical patch devfs alias for this pass instance.

Submitted by:	gibbs
Sponsored by:	Spectra Logic Corporation
2011-06-14 17:10:32 +00:00
Xin LI
f5d62d03ad Don't consider ioctl returning error as a fatal error and move on to next
disk.  When multiple devices are specified, a non-supporting ioctl will
cause diskinfo(8) to stop at the point which does not seem to be necessary.

Ok'ed by:	phk
MFC after:	1 month
2011-02-08 11:32:22 +00:00
Ed Schouten
71ccf09269 The last big commit: let usr.sbin/ use WARNS=6 by default. 2010-01-02 11:07:44 +00:00
Alexander Motin
851b967a27 Make diskinfo report disk stripe size and offset. It should help users to
make file systems optimally aligned and tuned for better performance.
2009-12-24 21:39:30 +00:00
Pawel Jakub Dawidek
18e5fe2840 Don't bother obtaining the ident if we are not going to print it. 2009-09-03 22:19:09 +00:00
Pawel Jakub Dawidek
c5791aae52 Print provider's ident when in verbose mode. 2007-05-06 00:25:21 +00:00
Ruslan Ermilov
59a3c79da6 Sort sections. 2005-01-18 20:02:45 +00:00
Ruslan Ermilov
9046f8cd17 Add -c to SYNOPSIS and usage(). 2005-01-11 10:53:09 +00:00
Søren Schmidt
6a33b3c60b Add -c option that calculates the overhead of read I/O ops. 2004-11-09 12:28:41 +00:00
Pawel Jakub Dawidek
8a4979c259 Actually negative size is possible for file system, but not for disk. 2004-05-25 12:11:13 +00:00
Pawel Jakub Dawidek
991d64ece8 In verbose mode print disk sizes in human readable form as well.
OK'ed by:	phk
2004-05-24 22:52:32 +00:00
Poul-Henning Kamp
cbf67506f6 Make WARNS=5 clean.
Prodded by:	Stefan Farfeleder <stefan@fafoe.narf.at>
2004-04-05 08:15:04 +00:00
Ruslan Ermilov
9137d52af5 Sync manpage's synopsis with usage(). 2004-03-30 07:37:04 +00:00
Ruslan Ermilov
a388918d35 Assorted mdoc(7) fixes. 2003-05-31 18:07:09 +00:00
Gordon Tetlow
a885db9a13 Correct a type in the bugs section. Also turn it into a list.
Approved by:	re(murray)
2003-05-11 22:22:10 +00:00
Poul-Henning Kamp
b8c2d40de1 I forgot a rather crucial cast when I made this sectorsize agnostic.
Tune iteration counts a bit.
2003-04-09 14:25:04 +00:00
Poul-Henning Kamp
a362eb6374 Diskinfo is a small program to access the basic properties of a disk device:
sectorsize, mediasize etc.

It also contains a small and naïve benchmark which reports on seek
and transfer performance.
2003-04-09 10:52:10 +00:00