Commit Graph

6762 Commits

Author SHA1 Message Date
Xin LI
658029e0d8 Use __packed to prevent alignment from taking place, which otherwise may
change the on-disk format in an incompatible way.  Without this change,
msdosfs created on FreeBSD/arm would not be mountable.

PR:		bin/162486
Submitted by:	Ian Lepore <freebsd damnhippie dyndns org>
Reported by:	Mattia Rossi <mrossi at swin.edu.au>
MFC after:	3 days
2011-11-11 20:31:48 +00:00
Gleb Smirnoff
0809c540f4 Note that NAT instance argument can be tablearg.
PR:		misc/162265
Submitted by:	Paul Procacci <pprocacci gmail.com>
2011-11-10 12:05:26 +00:00
Ed Schouten
f44afd26af Remove trailing whitespace. 2011-11-09 21:01:50 +00:00
Adrian Chadd
dd21aaf873 Add quiet time element configuration support to ifconfig.
This allows a hostap to specify to a set of stations that they
should not transmit for a certain period of time after each
beacon interval has expired. This is used when searching for
radar pulses or general interference.

Submitted by:	Himali Patel <himali.patel@sibridgetech.com>
Sponsored by:	Sibridge Technologies
2011-11-08 14:22:40 +00:00
Andrey V. Elsukov
b06ce6855c Fix multi-line comment formatting.
MFC after:	2 weeks
2011-11-07 07:51:10 +00:00
Andrey V. Elsukov
39e9a28fdf Fix multi-line comment formatting.
Pointed by:	jh
MFC after:	1 week
2011-11-07 07:50:35 +00:00
Andrey V. Elsukov
fd1ca22afb Improve error reporting when MBR can not be written.
Remove obsolete code which uses DIOCSMBR ioctl.
When writing MBR first check that GEOM_MBR is available, if it is not
available, then try write MBR directly to provider. If both are failed,
then recommend to use gpart(8).

MFC after:	2 week
2011-11-07 06:24:35 +00:00
Andrey V. Elsukov
1b100fd31b Initialize "acc" value inside the loop to reset failed attempts.
PR:		misc/162262
MFC after:	3 days
2011-11-06 21:12:52 +00:00
Andrey V. Elsukov
99e57974a6 Add reference to gpart(8).
MFC after:	3 days
2011-11-06 20:39:35 +00:00
Andrey V. Elsukov
9a5e36b804 Add reference to gpart(8).
MFC after:	3 days
2011-11-06 20:38:27 +00:00
Andrey V. Elsukov
fd4bbf84f2 Add recommendation to use gpart(8) when user tries write disklabel
or bootcode to already opened provider.

MFC after:	1 week
2011-11-06 20:32:55 +00:00
Andrey V. Elsukov
b11075cdeb Remove unneeded checks.
MFC after:	1 week
2011-11-06 19:03:07 +00:00
Andrey V. Elsukov
982e6e69cd bsdlabel(8) could automatically fill many of disklabel's deprecated
fields, but user could specify some of those fields when edits disklabel
with `bsdlabel -e`. But without -A flag these fields might be
overwritten with default values from the virgin disklabel.
So, don't overwrite such fields if they are not zero. Also add checks
to prevent creating disklabel with less than DEFPARTITIONS and more
than MAXPARTITIONS partitions.

PR:		bin/162332
Tested by:	Eugene Grosbein
MFC after:	1 week
2011-11-06 18:59:42 +00:00
Andrey V. Elsukov
1fd45acda6 To be in sync with GEOM_PART_BSD limit the maximum number of supported
partitions to 20.

MFC after:	1 week
2011-11-06 17:30:32 +00:00
Ed Schouten
1efe3c6b58 Add missing static keywords for global variables to tools in sbin/.
These tools declare global variables without using the static keyword,
even though their use is limited to a single C-file, or without placing
an extern declaration of them in the proper header file.
2011-11-04 13:36:02 +00:00
John-Mark Gurney
21fa393279 remove trailing whitespace...
MFC after:	1 week
2011-10-29 17:30:57 +00:00
John-Mark Gurney
469a1218c0 error if /boot/mbr is empty... This can happen on a system like arm
that doesn't have a /boot/mbr, and you touch it to get past the previous
error message...

MFC after:	1 week
2011-10-29 17:28:59 +00:00
Pawel Jakub Dawidek
0ebcf9e6cb Remove redundant space.
MFC after:	3 days
2011-10-27 20:36:35 +00:00
Pawel Jakub Dawidek
07ebc3626e Implement 'async' mode for HAST.
MFC after:	3 days
2011-10-27 20:32:57 +00:00
Pawel Jakub Dawidek
3f5bce1822 Minor cleanups.
MFC after:	3 days
2011-10-27 20:15:37 +00:00
Pawel Jakub Dawidek
43b8675beb Reduce indentation.
MFC after:	3 days
2011-10-27 20:13:39 +00:00
Pawel Jakub Dawidek
5a58d22a84 Improve comment so it doesn't suggest race is possible, but that we handle
the race.

MFC after:	3 days
2011-10-27 20:10:21 +00:00
Pawel Jakub Dawidek
949350bb1f - Eliminate the need for hio_nv.
- Introduce hio_clear() function for clearing hio before returning it
  onto free queue.

MFC after:	3 days
2011-10-27 20:01:23 +00:00
Pawel Jakub Dawidek
1212a85c4a Monor cleanups.
MFC after:	3 days
2011-10-27 18:49:16 +00:00
Pawel Jakub Dawidek
8a34134ac2 Delay resuid generation until first connection to secondary, not until first
write. This way on first connection we will synchronize only the extents that
were modified during the lifetime of primary node, not entire GEOM provider.

MFC after:	3 days
2011-10-27 18:45:01 +00:00
Pawel Jakub Dawidek
982369192e Correct comments.
MFC after:	3 days
2011-10-27 16:22:17 +00:00
Alexander Motin
733a1f3f52 Clarify disks/volumes above 2TiB support in geom_raid:
- add support for volumes above 2TiB with Promise metadata format;
 - enforse and document other limitations:
   - Intel and Promise metadata formats do not support disks above 2TiB;
   - NVIDIA metadata format does not support volumes above 2TiB.

Sponsored by:	iXsystems, Inc.
MFC after:	2 weeks
2011-10-26 21:50:10 +00:00
Hiroki Sato
0321b694c7 - Add support for a "!" character in regex matching in devd(8). It inverts
the logic (true/false) of the matching.

- Add "!usbus[0-9]+" to IFNET ATTACH notification handler in the default
  devd.conf to prevent rc.d/netif from running when usbus[0-9]+ is attached.

Reviewed by:	imp
2011-10-26 02:11:28 +00:00
Ed Schouten
ce458f4239 Build swapon with WARNS=6.
Don't use a variable called stat, because it collides with stat(2).
2011-10-25 17:10:15 +00:00
Pawel Jakub Dawidek
1f8c92e6fa Add support for creating GELI devices with older metadata version for use
with older FreeBSD versions:
- Add -V option to 'geli init' to specify version number. If no -V is given
  the most recent version is used.
- If -V is given don't allow to use features not supported by this version.
- Print version in 'geli list' output.
- Update manual page and add table describing which GELI version is
  supported by which FreeBSD version, so one can use it when preparing GELI
  device for older FreeBSD version.

Inspired by:	Garrett Cooper <yanegomi@gmail.com>
MFC after:	3 days
2011-10-25 13:57:50 +00:00
Pawel Jakub Dawidek
74ef73007a Revert r226726. The line was not duplicated.
Spotted by:	pluknet
MFC after:	3 days
2011-10-25 13:49:48 +00:00
Pawel Jakub Dawidek
bf5ad81592 Remove duplicated line.
MFC after:	3 days
2011-10-25 12:26:19 +00:00
Pawel Jakub Dawidek
ef055009c2 Add 'geli version' subcommand, which will print GELI metadata version of each
given GEOM provider or if not providers are given it will print versions
supported by userland geli(8) utility and by ELI GEOM class.

MFC after:	3 days
2011-10-25 08:03:51 +00:00
Pawel Jakub Dawidek
3bddbd0f3b When we detect GELI metadata version that is newer than the highest we
support, inform the user about that instead of 'MD5 hash mismatch'.

Suggested by:	Garrett Cooper <yanegomi@gmail.com>
MFC after:	3 days
2011-10-25 07:56:27 +00:00
Pawel Jakub Dawidek
79e6fcac83 Simplify eli_resize() function.
MFC after:	3 days
2011-10-25 07:44:10 +00:00
Pawel Jakub Dawidek
f1a465000f Simplify eli_dump() function and allow to dump metadata stored in backup file.
MFC after:	3 days
2011-10-25 07:37:02 +00:00
Pawel Jakub Dawidek
275ae453d6 If 'req' is NULL, print error on stderr.
MFC after:	3 days
2011-10-25 07:34:35 +00:00
Pawel Jakub Dawidek
c99a654256 Simplify eli_is_attached() function and make it return boot instead of int.
MFC after:	3 days
2011-10-25 07:32:43 +00:00
Pawel Jakub Dawidek
34c4866250 Simplify eli_backup_create() and eli_backup_restore() functions.
As a side-effect it is now possible to backup unsupported (newer)
GELI metadata versions.

MFC after:	3 days
2011-10-25 07:31:13 +00:00
Pawel Jakub Dawidek
3ab01ecf56 Sort includes.
MFC after:	3 days
2011-10-25 07:24:51 +00:00
Maxim Sobolev
633d2bc579 Add new option -F to specify alternative location of the /etc/fstab
file.

MFC after:	1 month
2011-10-25 01:47:33 +00:00
Maxim Sobolev
f2104fc0ad Add new option -c to specify alternatve location of the /etc/fstab
file.

MFC after:	1 month
2011-10-25 01:46:42 +00:00
Kirk McKusick
23ad9069cb The current /etc/dumpdates file restricts device names to 32 characters.
With the addition of various GEOM layers some device names now exceed
this length, for example /dev/mirror/encrypted.elig.journal. This
change expands the field to 53 bytes which brings the /etc/dumpdates
lines to 80 characters. Exceeding 80 characters makes the /etc/dumpdates
file much less human readable. A test is added to dump so that it
verifies that the device name will fit in the 53 character field
failing the dump if it is too long.

This change has been checked to verify that its /etc/dumpdates file
is compatible with older versions of dump.

Reported by: Martin Sugioarto <martin@sugioarto.com>
PR:          kern/160678
MFC after:   3 weeks
2011-10-18 18:42:26 +00:00
Pawel Jakub Dawidek
bd738d630c Allow to specify pidfile in HAST configuration file.
MFC after:	1 week
2011-10-17 12:22:09 +00:00
Pawel Jakub Dawidek
89da1a23cd Remove redundant space.
MFC after:	1 week
2011-10-17 09:59:04 +00:00
Pawel Jakub Dawidek
6fea20e297 When path to the configuration file is relative, obtain full path,
so we can always find the file, even after daemonizing and changing
working directory to /.

MFC after:	1 week
2011-10-17 09:54:07 +00:00
Olivier Houchard
10f94f86f5 Unbreak NO_DYNAMICROOT by explicitely linking to libcrypto if MK_OPENSSL isn't
set to no, as libbsnmp needs it.
2011-10-16 16:58:28 +00:00
Eitan Adler
36daf0495a - change "is is" to "is" or "it is"
- change "the the" to "the"

Approved by:	lstewart
Approved by:	sahil (mentor)
MFC after:	3 days
2011-10-16 14:30:28 +00:00
Dag-Erling Smørgrav
23f39c906b Make dhclient use a pid file. Modify the rc script accordingly; while
there, clean it up and add some error checks.

Glanced at by:	brooks@
MFC after:	3 weeks
2011-10-13 17:20:45 +00:00
Kirk McKusick
8ee53ea3a1 After creating a filesystem using newfs -j the time stamps are all
zero and thus report as having been made in January 1970. Apart
from looking a bit silly, it also triggers alarms from scripts
that detect weird time stamps. This update sets all 4 (or 3, in
the case of UFS1) time stamps to the current time when enabling
journaling during newfs or later when enabling it with tunefs.

Reported by: Hans Ottevanger <hans@beastielabs.net>
MFC after:   1 week
2011-10-11 19:03:57 +00:00