summaryrefslogtreecommitdiffstats
path: root/sys-utils/readprofile.c
Commit message (Collapse)AuthorAgeFilesLines
* readprofile: be more explicit with used types [cppcheck]Karel Zak2019-05-281-2/+2
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* misc: consolidate version printing and close_stdout()Karel Zak2019-04-161-3/+3
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* various: fix 'uninitialized when used' warnings [clang]Sami Kerola2019-02-181-1/+1
| | | | | | | This change fixes "warning: variable 'var' may be uninitialized when used here [-Wconditional-uninitialized]" warnings reported in various files. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* readprofile: check input file is not empty [asan]Sami Kerola2019-01-131-0/+2
| | | | | Addresses: https://github.com/karelzak/util-linux/issues/717 Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* misc: consolidate macro style USAGE_HELP_OPTIONSRuediger Meier2017-06-291-2/+2
| | | | | | | | | changed in include/c.h and applied via sed: sed -i 's/fprintf.*\(USAGE_MAN_TAIL.*\)/printf(\1/' $(git ls-files -- "*.c") sed -i 's/print_usage_help_options\(.*\);/printf(USAGE_HELP_OPTIONS\1);/' $(git ls-files -- "*.c") Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* misc: introduce print_usage_help_options()Ruediger Meier2017-06-271-2/+1Star
| | | | | | | | | | | | Consolidate --help and --version descriptions. We are now able to align them to the other options. We changed include/c.h. The rest of this patch was generated by sed, plus manually setting the right alignment numbers. We do not change anything but white spaces in the --help output. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* misc: cosmetics, remove argument from usage(FILE*)Ruediger Meier2017-06-261-4/+4
| | | | | | | | | | | | | | This patch is trivial and changes nothing, because we were always using usage(stdout) Now all our usage() functions look very similar. If wanted we could auto-generate another big cosmetical patch to remove all the useless "FILE *out" constants and use printf and puts rather than their f* friends. Such patch could be automatically synchronized with the translation project (newlines!) to not make the translators sick. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* misc: do not use plain 0 as NULL [smatch scan]Sami Kerola2017-02-201-3/+3
| | | | | | | | | | text-utils/tailf.c:69:21: warning: Using plain integer as NULL pointer Since many 'struct option' has used zero as NULL make them more readable in same go by reindenting, and using named argument requirements. Reference: https://lwn.net/Articles/93577/ Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* Use --help suggestion on invalid optionKarel Zak2016-12-191-1/+1
| | | | | | | | The current default is to print all usage() output. This is overkill in many case. Addresses: https://github.com/karelzak/util-linux/issues/338 Signed-off-by: Karel Zak <kzak@redhat.com>
* readprofile: add scanf field width limits [cppcheck]Boris Egorov2016-01-191-2/+2
| | | | | [sys-utils/readprofile.c:301]: (warning) scanf without field width limits can crash with huge input data. [sys-utils/readprofile.c:322]: (warning) scanf without field width limits can crash with huge input data.
* sys-utils/disk-utils/lib: fix printf format types [cppcheck]Boris Egorov2015-06-251-6/+6
| | | | | | Fix 'invalidPrintfArgType' cppcheck warnings Signed-off-by: Boris Egorov <egorov@linux.com>
* textual: add a docstring to most of the utilitiesBenno Schulenberg2015-01-061-1/+4
| | | | | | | | | This adds a concise description of a tool to its usage text. A first form of this patch was proposed by Steven Honeyman (see http://www.spinics.net/lists/util-linux-ng/msg09994.html). Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* readprofile: fix --reest (--reset) typoKarel Zak2013-03-041-1/+1
| | | | | Reported-by: Branislav Blaskovic <notifications@github.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* textual: spell and encode the name of Arkadiusz Miƛkiewicz correctlyBenno Schulenberg2013-02-061-1/+1
| | | | Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* fdisk: fix compiler warning [-Wpointer-arith] and floating point exceptionKarel Zak2012-10-231-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* sys-utils: verify writing to streams was successfulSami Kerola2012-04-041-0/+2
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* docs: corrections to FSF license files, and postal addressSami Kerola2012-02-241-3/+3
| | | | | | | | | | | | | | The COPYING and Documentation/licenses/COPYING* files are being replaced by files from GNU web site. http://www.gnu.org/licenses/gpl-2.0.txt http://www.gnu.org/licenses/lgpl-2.1.txt Postal addresses to FSF in other files are updated to match with the address in license files. Reference: http://lists.gnu.org/archive/html/freefont-announce/2005-04/msg00001.html Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* readprifile: remove unnecessary optstring arrayKarel Zak2011-11-141-2/+1Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* readprofile: fix coding styleSami Kerola2011-11-021-77/+78
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* readprofile: use libc error printing facilitiesSami Kerola2011-11-021-53/+26Star
| | | | | | This commit also changes all exit values to be symbolic. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* readprofile: add long optionsSami Kerola2011-11-021-23/+49
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* misc: use %m in format string instead of %s and strerror(errno)Petr Uzel2011-09-271-4/+4
| | | | Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
* readprofile: fix compiler warnings [-Wsign-compare]Karel Zak2011-08-011-3/+6
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* readprofile: don't stop parsing at __init_endPo-Yu Chuang2011-04-121-2/+4
| | | | | | | | | | Some architectures like ARM place __init_end before .text section. If any function in .init section is hit while profiling, readprofile stops at __init_end. That means if we enable profiling at boot time, the profiler probably hits init functions and readprofile does not work well unless we reset profiling buffer with -r option. Signed-off-by: Po-Yu Chuang <ratbert@faraday-tech.com>
* sys-utils: make use xalloc wrappersDavidlohr Bueso2010-11-011-20/+3Star
| | | | Signed-off-by: Davidlohr Bueso <dave@gnu.org>
* readprofile: several strings without gettext callsPedro Ribeiro2008-10-031-3/+3
| | | | | Signed-off-by: Pedro Ribeiro <p.m42.ribeiro@gmail.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* readprofile: fix on ppc64Matthias Koenig2007-07-241-6/+16
| | | | | | | | | | | | Fix inconsistency between kernel profiling and readprofile. The range of kernel profiling is between _stext and _etext, and readprofile tries to extract profiling for all the symbols in /boot/System.map-2.6.16.11-7-ppc64 from /proc/profile, but there are more symbols in /boot/System.map-2.6.16.11-7-ppc64 than those between _stext and _etext. Signed-off-by: Matthias Koenig <mkoenig@suse.de> Signed-off-by: Karel Zak <kzak@redhat.com>
* also search for __stext in readprofileMike Frysinger2007-07-101-1/+2
| | | | | | | Some architectures have a single underscore prefix in their ABI, so there will be no "_stext" symbol, just "__stext". Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Imported from util-linux-2.13-pre2 tarball.Karel Zak2006-12-071-2/+2
|
* Imported from util-linux-2.13-pre1 tarball.Karel Zak2006-12-071-1/+1
|
* Imported from util-linux-2.12k tarball.Karel Zak2006-12-071-1/+1
|
* Imported from util-linux-2.12j tarball.Karel Zak2006-12-071-0/+4
|
* Imported from util-linux-2.12b tarball.Karel Zak2006-12-071-27/+48
|
* Imported from util-linux-2.12a tarball.Karel Zak2006-12-071-7/+8
|
* Imported from util-linux-2.12 tarball.Karel Zak2006-12-071-52/+104
|
* Imported from util-linux-2.11u tarball.Karel Zak2006-12-071-12/+31
|
* Imported from util-linux-2.11q tarball.Karel Zak2006-12-071-5/+10
|
* Imported from util-linux-2.11o tarball.Karel Zak2006-12-071-1/+1
|
* Imported from util-linux-2.11n tarball.Karel Zak2006-12-071-3/+34
|
* Imported from util-linux-2.11m tarball.Karel Zak2006-12-071-6/+26
|
* Imported from util-linux-2.11f tarball.Karel Zak2006-12-071-0/+6
|
* Imported from util-linux-2.11b tarball.Karel Zak2006-12-071-161/+174
|
* Imported from util-linux-2.10s tarball.Karel Zak2006-12-071-3/+3
|
* Imported from util-linux-2.10m tarball.Karel Zak2006-12-071-22/+22
|
* Imported from util-linux-2.10f tarball.Karel Zak2006-12-071-6/+11
|
* Imported from util-linux-2.9v tarball.Karel Zak2006-12-071-10/+20
|
* Imported from util-linux-2.8 tarball.Karel Zak2006-12-071-1/+1
|
* Imported from util-linux-2.7.1 tarball.Karel Zak2006-12-071-116/+111Star
|
* Imported from util-linux-2.2 tarball.Karel Zak2006-12-071-0/+223