summaryrefslogtreecommitdiffstats
path: root/usr.bin
Commit message (Collapse)AuthorAgeFilesLines
* Sync as close as possible with NetBSD.pjd2005-11-161-92/+115
| | | | | | | | | | | | | | | This includes fixes and cleanups listed below: - If a process dissappears while we are signalling it, don't count it as a match/error. - Better handling of errors and messages. - Downgrade failure to kill(2) (other than ESRCH) from fatal error to a warning; otherwise processing aborts and possibly matching killees would remain unsignalled. This makes pkill match the Solaris behavior. - Exit with 2 on usage errors as documented. Obtained from: NetBSD Glanced at by: maintainer (gad) [a bit different version of this patch]
* I often find myself doing:pjd2005-11-162-15/+45
| | | | | | | | | | | | | | % pgrep <something> [to verify which processes match] % pkill <something> To speed such operation up, add -I option which works like rm(1)'s -i option (unfortunately -i is already used in pkill(1)), ie. pkill will ask for confirmation before killing each matching process. After adding -j, -F, -i, -S, -o and -L options and other improvements, I think I can add myself to the copyright header. Glanced at by: maintainer (gad)
* Eliminate coredump problem introduced by last commit.rodrigc2005-11-141-2/+8
| | | | Noticed by: Guido van Rooij <guido at gvr dot org>
* Eliminate build breakage due to warnings about const.rodrigc2005-11-141-3/+3
|
* Use ANSI definitions.dwmalone2005-11-1313-574/+352
| | | | | Avoid using extern by declaring shared functions in header files. Const poision.
* len and len2 work better as size_tdwmalone2005-11-131-1/+2
|
* Const poision, deregister and use ANSI definitions.dwmalone2005-11-131-23/+20
|
* Declare find_err in indent_globs.h where the other shared variablesdwmalone2005-11-133-4/+1
| | | | live rather than listing it as an extern in indent.c.
* Avoid shadowing a local scratch variable,dwmalone2005-11-131-2/+2
|
* Modify netstat -mb to use libmemstat when accessing a core dump or liverwatson2005-11-133-178/+54
| | | | | | | | | | | | | | | | kernel memory and not using sysctl. Previously, libmemstat was used only for the live kernel via sysctl paths. This results in netstat output becoming both more consistent between core dumps and the live kernel, and also more information in the core dump case than previously (i.e., mbuf cache information). Statistics relating to sfbufs still rely on a kvm descriptor as they are not currently exposed via libmemstat. netstat -m operating on a core is still unable to print certain sfbuf stats available on the live kernel. MFC after: 1 week
* Add "-s" argument to kdump to suppress the display of I/O data.rwatson2005-11-122-4/+11
| | | | MFC after: 1 week
* Look through ext2fs file systems as well as ufs.grog2005-11-121-1/+1
| | | | | | This should almost certainly be extended to other local file systems as well (ntfs springs to mind), but I don't have the ability to test it.
* Align output.ru2005-11-091-2/+2
|
* Edit pathnames for -x but not for -t. Otherwise, people get confusedkientzle2005-11-061-1/+1
| | | | | | | | when list the archive contents, then try to extract selected files (file selection always works against unedited pathnames). With this change, -t always shows the pathnames as they appear in the archive. Thanks to: Robert Watson
* Un-break processing of device major/minor values with fstat -n. We docsjp2005-11-051-3/+5
| | | | | | | | | | | this by accessing the cdev_priv element of the cdev structure. Looking forward we need a better way to handle this, as this structure shouldn't be frobbed by userspace. Submitted by: Doug Steinwand PR: bin/88203 MFC after: 1 week Discussed with: phk
* o Update list of holidays in Russia.maxim2005-11-021-7/+10
| | | | | Submitted by: osa MFC after: 1 week
* Fix an erroneous description of the file descriptor assignments forjdp2005-11-021-5/+3
| | | | | | the "~C" command. MFC After: 1 week
* Xref setlocale(3), bump document date.trhodes2005-11-011-1/+3
|
* Add a "-H" argument to kdump, which causes kdump to print an additionalrwatson2005-11-012-6/+33
| | | | | | | | | | | | | | field holding the threadid. This is more useful for libthr than libpthread, but still quite useful in libpthread as it can be used to process interlaced records from multiple threads over the course of a system call. Detect old ktr_buffer values using the heuristic "if it's negative, then it must not be a valid threadid". This may leave something to be desired. MFC after: 1 month Reviewed by: davidxu
* In mode 'u', check for an error return from archive_read_open.kientzle2005-11-011-2/+6
| | | | | | | | | | | | | This causes attempts to update a non-existent file to report an actual error instead of triggering an assertion failure. PR: bin/87911 Thanks to: roemer.ulrich MFC after: 3 days Note: This does not entirely fix bin/87911. I need to decide on the "correct" response when someone tries to update a non-existent archive file.
* Include <sys/param.h> in order to get current __FreeBSD_versionkientzle2005-11-011-0/+1
| | | | | | | | in order to properly set HAVE_NL_LANGINFO. <whew!> Thanks to: Andrey Chernov PR: bin/88013 MFC after: 3 days
* Spell "--format" correctly in error message. (It hasn't beenkientzle2005-11-011-1/+1
| | | | | | | | called "-F" for a very long time.) PR: bin/86915 Thanks to: Gary W. Swearingen MFC after: 3 days
* new committer: added my birthday to the calendaraaron2005-10-301-0/+1
| | | | Approved by: tobez
* Add some significant Ukrainian dates.ru2005-10-286-1/+102
| | | | | PR: 88076 Submitted by: Andriy Gapon
* Fix misspelled 'argument' and try to make the sentence into English.jhb2005-10-261-1/+1
| | | | Submitted by: Andre Guibert de Bruet andy at siliconlandmark dot com
* Use the "builtin" shell function to make sure that the requestedcperciva2005-10-241-1/+1
| | | | | | | | | | | command is handled as a shell function. This avoids the following peculiar behaviour when /usr/bin is on a case-insensitive filesystem: # READ foo (... long pause, depending upon the amount of swap space available ...) sh: Resource temporarily unavailable. Reported by: I can't remember; someone on IRC. MFC after: 1 week
* Document incorrect handling of multibyte characters.tjr2005-10-231-1/+5
| | | | PR: 87724
* Fix obvious copy'n'paste-O in rev.1.36 While here nit style.mlaier2005-10-221-3/+3
| | | | | | PR: bin/87783 Submitted by: Mats Palmgren MFC after: 1 week
* Use the new name H_SETSIZE instead of the old H_EVENT to set the historystefanf2005-10-191-1/+1
| | | | | | size. PR: 86355
* Make sure that files included using ".include <foo>" are reallyru2005-10-171-17/+16
| | | | | | | | looked for in the system make file directory or in the specified -m paths instead of always looking in the other -I and .PATH specified paths. (Commit log shamelessly stolen from NetBSD.) Reviewed by: yar
* Obtain true uptime through clock_gettime(CLOCK_MONOTONIC, struct *timespec)andre2005-10-172-25/+7
| | | | | | instead of subtracting 'bootime' from 'now'. Sponsored by: TCP/IP Optimization Fundraise 2005
* The kernel accepts sockaddrs with len set to zero for sockaddr_inalfred2005-10-151-9/+20
| | | | types, so refactor the code here to grab them when length is zero.
* Revise the manpage to a certain extent, mostly with respect toyar2005-10-141-32/+68
| | | | | | | make's processing of top-level and included makefiles. Point out at make.conf(5) and __MAKE_CONF when telling about sys.mk. Reviewed by: ru
* Style: move .PATH to where it belongs.ru2005-10-141-2/+2
|
* __MAKE_CONF doesn't really belong here because it isyar2005-10-121-10/+1
| | | | | | | a FreeBSD extension of sys.mk. A xref to make.conf(5) will be enough here. Requested by: ru
* Clarify the usage and effects of sys.mk, make.conf(5), and __MAKE_CONF.yar2005-10-101-4/+13
| | | | MFC after: 2 weeks
* Make sure that the created fifo gets deleted if the top level make instancescottl2005-10-091-0/+2
| | | | exits due to a signal.
* Finish off style(9) fixes which I started two revisions ago. This basicallycsjp2005-10-091-20/+24
| | | | | changes the indentation style from 4 spaces to 8 spaces which we expect to see in other FreeBSD source files.
* Catch up with increasing the resolution suitable for high-res kernelbde2005-10-071-3/+13
| | | | | | | profiling from microseconds to nanoseconds in 1996. Picoseconds are already needed. Describe the choice of units for the per-call times in detail.
* Do not ignore ENOENTcsjp2005-10-071-88/+68
| | | | Pointed out by: Amir Shalem
* Improve printing of self times in the flat profile for functions thatbde2005-10-071-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | appear to be never called: (1) If a function is never called according to its call count but it must have been called because its child time is nonzero, then print it in the flat profile. Previously, if its call count was zero then we only printed it in the flat profile if its self time was nonzero. (2) If a function has a zero call count but has a nonzero self or child time, then print its total self time in the self time per call column as a percentage of the total (self + child) time. It is not possible to print the times per call in this case because the call count is zero. Previously, this was handled by leaving both per-call columns blank. The self time is printed in another column but there was no way to recover the total time. (1) partially fixes the case of the "never called" function main() and prepares for (2) to apply to main() and other functions. Profiling of main() was lost in the conversion from a.out to ELF, so main()'s call count has always been zero for many years; then in the common case where main() is a tiny function, it gets no profiling ticks, so main() was completely lost in the flat profile. (2) improves mainly cases like kernel threads. Most kernel threads appear to be never called because they are always started before userland can run to turn on profiling. As for main(), the fact that they are called is not very interesting and their callers are uninteresting, but their relative self time is interesting since they are long-running. Almost always printing percentages in the per-call columns would be more useful than almost always printing 0.0ms. 0.1ms is now a long time, so only very large functions take that long per call. The accuracy per call can approach 1-10 nsec provided programs are run for about 100000 times as long as is necessary to get this accuracy with high resolution kernel profiling.
* Sync usage screen with manpage.yar2005-10-071-7/+6
| | | | MFC after: 5 days
* Document the -d flag to mail(1) better, which comes handy whenyar2005-10-071-6/+15
| | | | | | | | | you want to see, e.g., sendmail arguments mail(1) will use. -H is not an independent flag, it's a modifier. Also explicitly say that -H will cause mail(1) to exit as soon as it prints the headers. MFC after: 5 days
* Adding myself to calendar.freebsdehaupt2005-10-061-0/+1
| | | | Approved by: novel (mentor)
* Un-break handling of -t 0 which was broken in my previous commit.csjp2005-10-051-5/+6
| | | | | | | | Add a flags argument to wait_for_lock so that O_NONBLOCK can be passed to open if a user doesn't want the open to sleep until the lock becomes available. Submitted by: Amir Shalem (partially modified)
* Fix long standing race condition associated with how lockf uses open(2)csjp2005-10-051-30/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | for mutual exclusion: A brief description of the problem: 1) Proc A picks up non-blocking lock on file X 2) Proc B attempts to pickup lock, fails then waits 3) Proc C attempts to pickup lock, fails then waits 4) Proc A releases lock 5) Proc B acquires lock, release it to pickup a non-blocking version 6) Proc C acquires lock, release it to pickup a non-blocking version 7) Both process B and C race each other to pickup lock again This occurs mainly because the processes do not keep the lock after they have been waiting on it. They drop it, attempt to re-acquire it. (They use the wait to notify when the lock has become available then race to pick it up). This results in additional CPU utilization during the race, and can also result in processes picking locks up out of order. This change attempts to correct this problem by eliminating the test/acquire race and having the operating system handle it. Reported by: kris Tested by: kris MFC after: 1 week
* A minor overhaul: added comments, split cmds in 2, changed synopsis.garys2005-09-301-105/+133
| | | | | | | | | | | | Split commands into two groups: one with optional count and one with required argument. Changed synopsis line accordingly. Added some hopefully-helpful comments based on experiments, knowing that not all hardware works the same. PR: docs/84101 Approved by: keramida MFC after: 3 days
* Oops, revert last commit (the manpage is still built in objdir).ru2005-09-281-1/+0
|
* Add NO_OBJ.ru2005-09-281-0/+1
|
* Remove bridge(4) from the tree. if_bridge(4) is a full functionalmlaier2005-09-274-51/+2
| | | | | | | | replacement and has additional features which make it superior. Discussed on: -arch Reviewed by: thompsa X-MFC-after: never (RELENG_6 as transition period)
OpenPOWER on IntegriCloud