summaryrefslogtreecommitdiffstats
path: root/include
Commit message (Collapse)AuthorAgeFilesLines
...
* remove duplicate includesKarel Zak2013-03-201-2/+4
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* lib/mbsalign: correct license header from GPLv[23] to LGPLv2+Pádraig Brady2013-03-201-2/+2
| | | | | | * lib/mbsalign.c: s/GPLv3/LGPLv2+/ * include/mbsalign.h: s/GPLv2/LGPLv2+/ * README.licensing: Remove mention GPLv3 as it's not actually used.
* dmesg: more colors, more funKarel Zak2013-03-181-1/+1
| | | | | | | | * colorize subsystem prefix * colorize time * colorize by keywords (now "segfault" only) Signed-off-by: Karel Zak <kzak@redhat.com>
* namespace.h: Fix typo: s/CLONE_NEWSNS/CLONE_NEWNS/Josh Triplett2013-03-131-1/+1
| | | | | | | | | | | This typo causes namespace.h to always unconditionally define CLONE_NEWNS rather than using the system definition. Bug present since the initial version of unshare in commit 4205f1fda1ac32046125a2e0f3937b666186bfab. Signed-off-by: Josh Triplett <josh@joshtriplett.org> Signed-off-by: Anton Cherkashyn <mail@antonc.com>
* include/timer: return setitimer return valueKarel Zak2013-03-131-2/+2
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* include/optutils: make collisions detection between options more robustKarel Zak2013-03-131-4/+12
| | | | | | | - don't rely on the correct ul_excl_t usage - don't print --(null) for non-existing long options Signed-off-by: Karel Zak <kzak@redhat.com>
* include: add timer.hKarel Zak2013-03-132-0/+32
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* lib/strutils: add strtotimeval_or_err()Karel Zak2013-03-131-0/+3
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* lib/procutils: add simple API to scan /proc/PID/*Karel Zak2013-03-121-0/+18
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libblkid: rename in sun_disklabel for compatibility with fdiskKarel Zak2013-03-111-8/+10
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* inlude/pt-sun: add flags and tagsKarel Zak2013-03-111-7/+23
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libblkid: move sun PT definition to include/Karel Zak2013-03-112-1/+74
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* lib/strutils: simplify strtosize(), return info about suffixKarel Zak2013-03-111-0/+21
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* fdisk: add callback for ask-numbers APIKarel Zak2013-03-111-0/+2
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: add exec_shell.h to distributionBernhard Voelker2013-03-041-0/+1
| | | | Signed-off-by: Bernhard Voelker <mail@bernhard-voelker.de>
* Merge branch 'patch-1' of https://github.com/dtrebbien/util-linuxKarel Zak2013-02-201-0/+3
|\ | | | | | | | | * 'patch-1' of https://github.com/dtrebbien/util-linux: Implement mempcpy() in terms of memcpy() if mempcpy() is unavailable
| * Implement mempcpy() in terms of memcpy() if mempcpy() is unavailableDaniel Trebbien2013-01-311-0/+3
| |
* | lib/tty: don't truncate output on non-terminalsKarel Zak2013-02-191-0/+1
| | | | | | | | | | | | | | | | | | | | | | for example: $ findmnt | cat $ lslocks > foo the output should not be truncated. Signed-off-by: Karel Zak <kzak@redhat.com>
* | unshare,nsenter: spawn shell by defaultZbigniew Jędrzejewski-Szmek2013-02-141-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | The behaviour mimics chroot. Possibly it would have been nicer to to query the password database in the new namepace and run the shell of the user there, but it's hard to do correctly. getpwuid() might need to load nss plugins, and the arch in the new namespace might be different (in case of NEWNS mounts), or the hostname might be different, etc. So in general it's not possible to do it reliably. Signed-off-by: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
* | build-sys: add namespace.h to distributionSami Kerola2013-02-061-0/+1
| | | | | | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* | setpriv: move paths to pathnames.hKarel Zak2013-02-051-0/+8
|/ | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* nsenter: fix indentationSami Kerola2013-01-251-28/+27Star
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* include: add missing values to sysfs_cxt initializer definitionSami Kerola2013-01-241-1/+1
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* unshare,nsenter: Move the old libc handling into a common header namespace.hEric W. Biederman2013-01-171-0/+43
| | | | | | | | | | | | | | Move the defitions of CLONE_NEWNS, CLONE_NEWUTS, CLONE_NEWIPC, CLONE_NEWNET, CLONE_NEWUSER, CLONE_NEWPID into namespace.h in case sched.h does not provide those definitions. Are there systems around that are old enough that still need this? Move the definitions of unshare() and setns() into namespace.h for supporting old versions of libc that does not provice these. I have tested this support with setns as I still have systems old enough that glibc does not wrap setns. Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
* build-sys: add files to distributionSami Kerola2013-01-101-0/+1
| | | | | | | To fix 'make distcheck' compilation. The fdisks/Makemodule.am has one new entry 'dos_part_types.h', the rest is about sorting the list. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* include/ttyutils: add default chardataWerner Fink2013-01-081-0/+24
| | | | | | | | | | | | this one moves the init_chardata to include/ttyutils.h as well as to lib/include/ttyutils.c. Also the macros CTL/CTRL are fixed in agetty.c and sulogin.c to use the XOR variant CTL. [kzak@redhat.com: use macro rather than global variable for default chardata] Signed-off-by: Werner Fink <werner@suse.de> Signed-off-by: Karel Zak <kzak@redhat.com>
* include: cleanup copyright headersKarel Zak2013-01-088-0/+50
| | | | | | | We use the code from include/ and lib/ on many places, so use public domain if possible or LGPL for code copied from libs. Signed-off-by: Karel Zak <kzak@redhat.com>
* include/bitopts: Use the operating system byteswapping functionsKarel Zak2013-01-081-63/+97
| | | | | | | The swap macros are already in libc. Co-Author: Cristian Rodríguez <crrodriguez@opensuse.org> Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: remove consoles.hKarel Zak2012-12-271-1/+0Star
| | | | | Reported-by: Bernhard Voelker <mail@bernhard-voelker.de> Signed-off-by: Karel Zak <kzak@redhat.com>
* sulogin: remove consoles.c from libcommonKarel Zak2012-12-232-51/+9Star
| | | | | | | | - move struct chardata to include/ttyutils.h - move console.{h,c} to login-utils/sulogin-* (it's sulogin specific) - fix sulogin and agetty includes Signed-off-by: Karel Zak <kzak@redhat.com>
* sulogin: make usleep() workaround workWerner Fink2012-12-181-3/+7
| | | | | | Simply fix a compile problem found during debugging console.c Signed-off-by: Werner Fink <werner@suse.de>
* sulogin: use the linked lists from list.h for consoles listWerner Fink2012-12-181-2/+4
| | | | | | | | | | with this the double linked list feature from util-linux is used instead of the single linked list. [kzak@redhat.com: use list_last_entry() and list INIT macros] Signed-off-by: Werner Fink <werner@suse.de> Signed-off-by: Karel Zak <kzak@redhat.com>
* include/list: add list_last_entry()Karel Zak2012-12-181-2/+5
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* include/list: fix undefined behavior in list_entry() macroSami Liedes2012-12-171-2/+3
| | | | | | | | | | | | | Update list_entry() macro, which is basically the same as the container_of() macro in the kernel, to use offsetof() to fix undefined behavior. Caught using clang -fsanitize=undefined. [kzak@redhat.com: port from e2fsprogs] Signed-off-by: Sami Liedes <sami.liedes@iki.fi> Signed-off-by: Karel Zak <kzak@redhat.com>
* lib/canonicalize: add canonicalize_path_restricted() to canonicalize without ↵Karel Zak2012-11-261-0/+1
| | | | | | suid permisssions Signed-off-by: Karel Zak <kzak@redhat.com>
* ipcs: determine ipc limits from /procSami Kerola2012-11-231-0/+1
| | | | | | | | | | | | Some of the limit values are not dynamic. Like in kernel these values are #defined. [kzak@redhat.com: - use better names for functions, - add ipcutils.{c,h} - read also shmmax from /proc] Signed-off-by: Sami Kerola <kerolasa@iki.fi> Signed-off-by: Karel Zak <kzak@redhat.com>
* lib/path: add path_read_u64()Karel Zak2012-11-231-1/+5
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* lib/path: rename functions to be more explicitKarel Zak2012-11-231-6/+6
| | | | | | ... and to have names compatible with lib/sysfs.c Signed-off-by: Karel Zak <kzak@redhat.com>
* ipcs: add /proc and /sys path definitionsSami Kerola2012-11-231-0/+11
| | | | | | | | | | | The necessary proc and sysfs files are tested to be present. When information files are missing the ipcs will use obsolted system calls, and data structures, as fallback. [kzak@redhat.com: - fix #define _PATH_PROC_IPC_MSG "/proc/sys/kernel/sem" typo] Signed-off-by: Sami Kerola <kerolasa@iki.fi> Signed-off-by: Karel Zak <kzak@redhat.com>
* lib/ttyutils: add get_terminal_name()Karel Zak2012-11-221-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* lib/ttyutils: create .c fileKarel Zak2012-11-221-32/+3Star
| | | | | | | | Well, now all tty stuff are incline functions in include/ttyutils.h. It's seems more elegant to create regular lib/ttyutils.c for libcommon and write test program. Signed-off-by: Karel Zak <kzak@redhat.com>
* lib/consoles: remove global variable consolesKarel Zak2012-11-091-2/+3
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* lib/consoles: add code to detect all system consolesWerner Fink2012-11-082-0/+49
| | | | Signed-off-by: Werner Fink <werner@suse.de>
* libmount: add private mnt_get_kernel_cmdline_option()Karel Zak2012-11-081-0/+3
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: cleanup cpu_set_t usageKarel Zak2012-11-021-0/+10
| | | | | | | - make taskset depend on cpu_set_t - make cpuset.c optional for libcommon and lib/path.c Signed-off-by: Karel Zak <kzak@redhat.com>
* lib/sysfs: add SCSI link functionsKarel Zak2012-10-232-0/+4
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* lib/sysfs: add functions for SCSI host attributesKarel Zak2012-10-231-0/+3
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* include/sysfs: add SCSI host:channel:target:lun supportKarel Zak2012-10-231-0/+11
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* include/c: move usleep() fallback to c.hKarel Zak2012-10-224-19/+17Star
| | | | | | To make it available everywhere in code. Signed-off-by: Karel Zak <kzak@redhat.com>
* include/c: remove MAXHOSTNAMELEN macroKarel Zak2012-10-191-11/+0Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>