summaryrefslogtreecommitdiff
path: root/src/bootchart
AgeCommit message (Collapse)Author
2013-04-10Use initalization instead of explicit zeroing in more placesZbigniew Jędrzejewski-Szmek
2013-04-01Always use our own MAX/MIN definitionsCristian Rodríguez
code in src/shared/macro.h only defined MAX/MIN in case they were not defined previously. however the MAX/MIN macros implemented in glibc are not of the "safe" kind but defined as: define MIN(a,b) (((a)<(b))?(a):(b)) define MAX(a,b) (((a)>(b))?(a):(b)) Avoid nasty side effects by using our own versions instead. Also fix the warnings derived from this change. [zj: - modify MAX3 macro to fix warning about _a shadowing _a, - do bootchart/svg.c too, - remove unused MIN3.]
2013-03-31bootchart: fix a potential buffer overrunZbigniew Jędrzejewski-Szmek
If the configured number of samples was close to MAXSAMPLES, the samples buffer could be overrun: - by 1, because of off-by-one in the condition (samples > arg_samples_len), and - by many in case of an overrun, because the number of samples to capture was increased, instead of being decreased. Simplify things by converting to a normal for-loop. In store.c: change buffer size from 4095 to 4096. 4095 is a strange number.
2013-03-31bootchart: split out option parsing from main()Zbigniew Jędrzejewski-Szmek
2013-03-31Remove some dead codeZbigniew Jędrzejewski-Szmek
Based on coverity report.
2013-03-28bootchart: properly terminate stringZbigniew Jędrzejewski-Szmek
systemd-199/src/bootchart/store.c:289: buffer_size_warning: Calling strncpy with a maximum size argument of 256 bytes on destination array "ps->name" of size 256 bytes might leave the destination string unterminated. ...and indeed, the string was used as NULL-terminated later on. pid_cmdline_strncpy is renamed to pid_cmdline_strscpy to commemorate the fact that it *does* properly terminate the string.
2013-03-21bootchart: fix two unitialized memory freesZbigniew Jędrzejewski-Szmek
The new gcc isn't bad! In file included from src/bootchart/svg.c:36:0: src/bootchart/svg.c: In function 'svg_ps_bars': ./src/shared/util.h:524:13: warning: 'enc_name' may be used uninitialized in this function [-Wmaybe-uninitialized] free(*(void**) p); ^ src/bootchart/svg.c:821:37: note: 'enc_name' was declared here char _cleanup_free_*enc_name; ^ CC src/udev/mtd_probe/mtd_probe-probe_smartmedia.o XSLT man/systemd.unit.5 In file included from src/bootchart/svg.c:36:0: src/bootchart/svg.c: In function 'svg_pss_graph': ./src/shared/util.h:524:13: warning: 'enc_name' may be used uninitialized in this function [-Wmaybe-uninitialized] free(*(void**) p); ^ src/bootchart/svg.c:395:37: note: 'enc_name' was declared here char _cleanup_free_*enc_name; ^
2013-03-11bootchart: bump RLIMIT_NOFILE only after we forked us off, so that the init ↵Lennart Poettering
system inherits the kernel default
2013-03-11bootchart: various superficial cleanupsLennart Poettering
Let's update bootchar to share the coding style a bit more with the rest of the package. - Some tabs/spaces fixes - add #pragma to header - split up header so that we have a 1:1 relation between .c and .h files like everywhere else - Prefix user command line arguments/configuration settings with "arg_". - other coding style fixes
2013-03-11bootchart: rename log.c to store.c to aovid confusion with src/shared/log.cLennart Poettering
2013-03-07Revert "bootchart: use _cleanup_close_"Zbigniew Jędrzejewski-Szmek
This reverts commit 0ea9530d401827e299c6e04a433e69a7a2a89d80. attribute(cleanup) can only be used inside functions (*of, sysfd are leaked). Cleanup functions are only called once when exiting scope (*f is leaked twice).
2013-03-07bootchart: use _cleanup_close_Nathaniel Chen
use _cleanup_{close_,fclose_} to close streams and file descriptors
2013-03-07bootchart: document -C, --cmdline parameterHarald Hoyer
2013-03-07bootchart: use _cleanup_fclose_Harald Hoyer
2013-03-07bootchart: rename global len to samples_lenHarald Hoyer
2013-03-07bootchart: add parameter "-C" to expand process names to the full cmdlineHarald Hoyer
2013-02-16bootchart: rename --filter to --no-filterZbigniew Jędrzejewski-Szmek
Turning off filtering with --filter is just too confusing. Config option "Filter" doesn't have to be changed, here "Filter=yes" already meant to filter.
2013-02-16bootchart: provide better error messagesZbigniew Jędrzejewski-Szmek
2013-02-16man: move bootchart README to manpage, docbooksifyZbigniew Jędrzejewski-Szmek
2013-02-14bootchart: if "root=/dev" is not matched, don't try to read /sysHarald Hoyer
2013-02-14bootchart: stricter checks of cli inputThomas Hindoe Paaboel Andersen
2013-02-14bootchart: use conf-parser & CamelCase names in .confThomas Hindoe Paaboel Andersen
2013-02-14bootchart: parse /etc/os-release rather than system-releaseHarald Hoyer
Also parse it early, so that we can get it in the initramfs.
2013-02-14bootchart: more fixes for bootchart in the initramfsHarald Hoyer
2013-02-14honor SELinux labels, when creating and writing config filesHarald Hoyer
Also split out some fileio functions to fileio.c and provide a SELinux aware pendant in fileio-label.c see https://bugzilla.redhat.com/show_bug.cgi?id=881577
2013-02-13man: bootchart: change /var/log to /run/logWilliam Giokas
As of [1], bootchart stores files in /run/log, not /var/log, by default. [1] f2f85884caac671da84256acb44148df9a4dca70
2013-02-13bootchart: Fix typos and some EnglishWilliam Giokas
bootchart.conf: direct users to `bootchart.conf(5)`, not a nonexistent man page. svg.c: Fix some English in the svg comment header. * Chrome/Chromium => Chrome, Chromium * firefox => Firefox * much more slow => more slowly
2013-02-12bootchart: make bootchart work from within the initrdHarald Hoyer
With this patch, bootchart can be started from within the initramfs via the kernel command line "rdinit=/usr/lib/systemd/systemd-bootchart" see: http://harald.fedorapeople.org/downloads/bootchart-20130207-1652.svg
2013-02-12systemd-bootchart: relicense to LGPLv2.1+Auke Kok
When we merged systemd-bootchart we omitted relicensing this to LGPL. Now that code is being used for other purposes we need to make sure the code is shareable within systemd without further problems. The original committers and contributors of bootchart before it was merged all have agreed with the relicensing.
2013-01-25Add _cleanup_pclose_ and fix mismatching pipe close opened by popen()Zbigniew Jędrzejewski-Szmek
Based-on-patch-by: Thomas Jarosch <thomas.jarosch@intra2net.com> cppcheck reported: [src/bootchart/svg.c:791]: (error) Mismatching allocation and deallocation: f
2013-01-21build-sys: add makefile to bootchartLennart Poettering
2013-01-14bootchart: no need for memset hereLennart Poettering
2013-01-10bootchart: fix a -Wshadow warning for "now"Auke Kok
2013-01-10bootchart: Convert malloc/memset to callocAuke Kok
2013-01-10bootchart: Convert !strcmp usage to streqAuke Kok
2013-01-10bootchart: make sure that every read buffer is null terminatedLukas Nykryn
2013-01-10bootchart: tabs to spacesThomas Hindoe Paaboel Andersen
2013-01-09bootchart: check return of fopen before setvbuf in log.cLukas Nykryn
2013-01-07bootchart: merge bootchartAuke Kok
Bootchart is renamed to 'systemd-bootchart' and installed as /usr/lib/systemd/systemd-bootchart. The configuration file will reside in /etc/systemd/bootchart.conf.