Commit Graph

179354 Commits

Author SHA1 Message Date
Martin Matuska
23c07ad60d MFC @247774 2013-03-04 09:35:50 +00:00
Adrian Chadd
bdb9fa5c87 add a method to set/clear the VMF field in the TX descriptor.
Obtained from:	Qualcomm Atheros
2013-03-04 07:40:49 +00:00
Eitan Adler
1eb9ea583b Remove check for NULL prior to free(9) and m_freem(9).
Approved by:	cperciva (mentor)
2013-03-04 02:21:34 +00:00
Eitan Adler
4cb9d1beca devd: Correct typo in comment.
Submitted by:	Christoph Mallon <christoph.mallon@gmx.de>
Approved by:	cperciva (mentor)
2013-03-04 02:21:31 +00:00
Eitan Adler
7d9e9c60a0 devd: Use simpler dst += *x instead of str.append(x, 1).
Submitted by:	Christoph Mallon <christoph.mallon@gmx.de>
Approved by:	cperciva (mentor)
2013-03-04 02:21:29 +00:00
Eitan Adler
a6393aa163 devd: Use string::empty() instea of string::length() == 0.
Submitted by:	Christoph Mallon <christoph.mallon@gmx.de>
Approved by:	cperciva (mentor)
2013-03-04 02:21:26 +00:00
Eitan Adler
1d9bf149ef devd: Remove unnecessary empty default constructors.
Submitted by:	Christoph Mallon <christoph.mallon@gmx.de>
Approved by:	cperciva (mentor)
2013-03-04 02:21:24 +00:00
Eitan Adler
012148abc2 devd: Remove empty virtual destructor from class, which has noch subclasses.
Submitted by:	Christoph Mallon <christoph.mallon@gmx.de>
Approved by:	cperciva (mentor)
2013-03-04 02:21:22 +00:00
Eitan Adler
5a3b1a3d7c devd: Avoid unnecessary temporary objects (and simplify the code) when handling std::string.
Submitted by:	Christoph Mallon <christoph.mallon@gmx.de>
Approved by:	cperciva (mentor)
2013-03-04 02:21:19 +00:00
Eitan Adler
6d58c721c6 devd: Use the standard constructor of std::string instead of string("").
Submitted by:	Christoph Mallon <christoph.mallon@gmx.de>
Approved by:	cperciva (mentor)
2013-03-04 02:21:17 +00:00
Eitan Adler
67ae3bf165 devd: Simplify while (1) { if (x) break; } to while (!x) {}.
Submitted by:	Christoph Mallon <christoph.mallon@gmx.de>
Approved by:	cperciva (mentor)
2013-03-04 02:21:15 +00:00
Eitan Adler
4efceb186c devd: Remove call to _exit() from signal handler, which also sets a stop flag.
Submitted by:	Christoph Mallon <christoph.mallon@gmx.de>
Approved by:	cperciva (mentor)
2013-03-04 02:21:12 +00:00
Eitan Adler
fcdcaa8807 devd: Use volatile sig_atomic_t for the flag set by a signal handler.
Submitted by:	Christoph Mallon <christoph.mallon@gmx.de>
Approved by:	cperciva (mentor)
2013-03-04 02:21:08 +00:00
Eitan Adler
240299864c Fix typo ('1' != 'l')
PR:		bin/175975
Submitted by:	William Ahern <william@25thandclement.com>
Approved by:	cperciva (mentor)
2013-03-04 02:21:06 +00:00
Eitan Adler
fd9593d55a Due to calendar(1)'s abuse of the C preprocessor "unix" gets expanded to
"1".  'Fix' this.

PR:		bin/175790
Submitted by:	ak
Approved by:	cperciva (mentor)
2013-03-04 02:21:03 +00:00
Eitan Adler
11fd1366bc Constify where possible.
Approved by:	cperciva (mentor)
2013-03-04 02:19:55 +00:00
Pawel Jakub Dawidek
8cb539f18f For some reason when I started to pass filedescent structures instead of
pointers to the file structure receiving descriptors stopped to work when also
at least few kilobytes of data is being send. In the kernel the
soreceive_generic() function doesn't see control mbuf as the first mbuf and
unp_externalize() is never called, first 6(?) kilobytes of data is missing as
well on receiving end.

This breaks for example tmux.

I don't know yet why going from 8 bytes to sizeof(struct filedescent) per
descriptor (or even to 16 bytes per descriptor) breaks things, but to
work-around it for now use 8 bytes per file descriptor at the cost of memory
allocation.

Reported by:	flo, Diane Bruce, Jan Beich <jbeich@tormail.org>
Simple testcase provided by:	mjg
2013-03-03 23:39:30 +00:00
Pawel Jakub Dawidek
5f39e56581 Use dedicated malloc type for filecaps-related data, so we can detect any
memory leaks easier.
2013-03-03 23:25:45 +00:00
Pawel Jakub Dawidek
a6157c3d61 Plug memory leaks in file descriptors passing. 2013-03-03 23:23:35 +00:00
Josh Paetzel
4a99f3fcc1 Use GNOP to force ZFS pools to 4k.
Obtained from:	PC-BSD
2013-03-03 23:07:27 +00:00
Josh Paetzel
9090eb778e Improves and enhances using the "installPackages=" variable.
Adds "pkgExt=" variable to set if pkgs are .tbz or .txz or other.
Auto-detects if packages are PKGNG or old PKG format.
Auto-bootstrap of PKGNG for the new installed environment.
Fixes issues with installing packages from local media, such as DVD/USB.

Switch to using a space-delimiter for installPackages, since a number
of packages use a "," in their version string.

Fix pc-sysinstall to ignore install scripts, and not hang on
user interaction prompts when installing pkgs.

Add pkg2ng command as apart of pkgng bootstrap process.

Obtained from:	PC-BSD
2013-03-03 23:01:46 +00:00
David Malone
9ed0c92c91 Add an option for finding sparse files.
Reviewed by:	iedowse
MFC after:	3 weeks
2013-03-03 20:10:56 +00:00
Alexander Motin
b6bc5f51fa Fix typos in hint names.
MFC after:	1 week
2013-03-03 19:10:28 +00:00
Jilles Tjoelker
3fe1119f98 sh: When executing a trap, keep exit status along with evalskip.
This ensures 'return' in a trap returns the correct status to the caller.

If evalskip is not set or if it is overridden by a previous evalskip, keep
the old behaviour of restoring the exit status from before the trap.
2013-03-03 17:33:59 +00:00
Ulrich Spörlein
21e0559cbc Fix 'make depend' 2013-03-03 16:17:09 +00:00
Jilles Tjoelker
ac232dc747 MAINTAINERS: Document my maintainership of sh(1). 2013-03-03 15:02:56 +00:00
Davide Italiano
3f555c45eb callwheelmask and callwheelsize are always greater than zero.
Switch their type to u_int.
2013-03-03 15:01:33 +00:00
Davide Italiano
0fb285b716 Remove a couple of unused include. 2013-03-03 14:47:02 +00:00
Jilles Tjoelker
2dea247f6b libedit: Revert r247683 to fix buildworld.
I think r247683 is wrong because libedit.so actually uses symbols from
libcurses.so. Since it breaks the build, revert it now.
2013-03-03 14:42:15 +00:00
Alexander V. Chernikov
579ed7bd05 Implement buffer size checking in ipfw(8) add cmd.
PR:		bin/65961
Submitted by:	Eugene Grosbein <eugen@grosbein.pp.ru>
MFC after:	2 weeks
2013-03-03 14:05:03 +00:00
Antoine Brodin
ae6c506346 Add more obsolete files. 2013-03-03 11:09:55 +00:00
Josh Paetzel
b771592d97 Fix a bug extracting files from dist scheme
Obtained from:	PC-BSD
2013-03-03 09:47:47 +00:00
Alexander Motin
4514d6fa18 MFcalloutng:
Some whitespace fixes.
2013-03-03 09:11:24 +00:00
Rui Paulo
e0dffa2de2 Remove the extra parenthesis from the cv_init() macro. They are not
necessary because we already use parenthesis in zfs_cv_init().

This fixes a long standing bug where there would be an extra ")" at the
end of the string. This extra parenthesis would show up in the WCHAN of
the process (top, stty status, etc.).
2013-03-03 06:42:36 +00:00
Pedro F. Giffuni
0b62a02269 libedit does not need to be linked with ncurses
libedit uses the terminfo headers but doesn't really need
to be linked with ncurses.

Discussed with:		christos@NetBSD
MFC after;		3 days
2013-03-03 02:11:03 +00:00
Attilio Rao
03e78eac37 Fix-up r247622 by also renaming pv_list iterator into the xen
pmap verbatim copy.

Sponsored by:	EMC / Isilon storage division
Reported by:	tinderbox
2013-03-03 01:02:57 +00:00
Pawel Jakub Dawidek
2328a74aa8 If all ioctls are allowed, cap_ioctls_get(2) will return CAP_IOCTLS_ALL.
Update regression tests.
2013-03-02 23:40:42 +00:00
Alexander Motin
27eae7e9ad Add protective parentheses for macro argument, missed in r247671. 2013-03-02 22:41:06 +00:00
Alexander Motin
25e533d3e5 Polish few spaces/tabs. 2013-03-02 22:28:20 +00:00
Alexander Motin
d4d29475e6 MFcalloutng:
Give OFED Linux wrapper own "expires" field instead of abusing callout's
c_time, which will change its type and units with calloutng commit.
2013-03-02 22:19:17 +00:00
Pawel Jakub Dawidek
7099ae5f3d Add support for bindat(2) and connectat(2).
Sponsored by:	The FreeBSD Foundation
2013-03-02 21:16:40 +00:00
Pawel Jakub Dawidek
378a73d1bd Regen after r247667. 2013-03-02 21:12:54 +00:00
Pawel Jakub Dawidek
7493f24ee6 - Implement two new system calls:
int bindat(int fd, int s, const struct sockaddr *addr, socklen_t addrlen);
	int connectat(int fd, int s, const struct sockaddr *name, socklen_t namelen);

  which allow to bind and connect respectively to a UNIX domain socket with a
  path relative to the directory associated with the given file descriptor 'fd'.

- Add manual pages for the new syscalls.

- Make the new syscalls available for processes in capability mode sandbox.

- Add capability rights CAP_BINDAT and CAP_CONNECTAT that has to be present on
  the directory descriptor for the syscalls to work.

- Update audit(4) to support those two new syscalls and to handle path
  in sockaddr_un structure relative to the given directory descriptor.

- Update procstat(1) to recognize the new capability rights.

- Document the new capability rights in cap_rights_limit(2).

Sponsored by:	The FreeBSD Foundation
Discussed with:	rwatson, jilles, kib, des
2013-03-02 21:11:30 +00:00
Alexander V. Chernikov
136b1ada11 Fix ipfw table argument parsing/printing.
Fix style.

PR:		kern/175909
Submitted by:	Daniel Hagerty <hag@linnaean.org>
MFC after:	2 weeks
2013-03-02 18:51:26 +00:00
Attilio Rao
737a61a1ee Garbage collect NTFS bits which are now completely disconnected from
the tree since few months.

This patch is not targeted for MFC.
2013-03-02 18:40:04 +00:00
Attilio Rao
0f90e981cb Remove ntfs headers dependency for g_label_ntfs.c by redefining the
used structs and values.

This patch is not targeted for MFC.
2013-03-02 18:23:59 +00:00
Jens Schweikhardt
5e1a43a84f Comment cosmetics: capitalize SCSI
Fix some hard tabs in the wrong place.

MFC after:	2 weeks
2013-03-02 18:08:03 +00:00
Alan Cox
55f33f2caf The value held by the vm object's field pg_color is only considered
valid if the flag OBJ_COLORED is set.  Since _vm_object_allocate()
doesn't set this flag, it needn't initialize pg_color.

Sponsored by:	EMC / Isilon Storage Division
2013-03-02 18:07:29 +00:00
Attilio Rao
4eb0218ace Garbage collect PORTALFS bits which are now completely disconnected from
the tree since few months.

This patch is not targeted for MFC.
2013-03-02 16:43:28 +00:00
Attilio Rao
f51fb78533 Garbage collect CODAFS bits which are now completely disconnected from
the tree since few months.

This patch is not targeted for MFC.
2013-03-02 16:30:18 +00:00