summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* column.c: replace emalloc with xcallocSami Kerola2011-05-011-20/+8Star
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* docs: agetty manual updateSami Kerola2011-04-271-5/+5
| | | | | | | Tell users how to see what issue escape will print by using other commands, such as uname. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* agetty.c: move issue path to pathnames.hSami Kerola2011-04-272-1/+4
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* agetty.c: further scrubbingSami Kerola2011-04-271-545/+555
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | In reply to two requests. http://permalink.gmane.org/gmane.linux.utilities.util-linux-ng/3990 http://permalink.gmane.org/gmane.linux.utilities.util-linux-ng/3999 The scubbing consists; o Old school introduction back to the top of the source file. o Indentation changes. o Removal of void casting. o Removal of braces from single statements. o Unified format for comments. o Comparison with W. Venema's code from 1993 to clean few comment mysteries. o Web referrals added to further explanation to near the code or comments which some could find difficult to understand why. o Clean up of comments. o FIXME items added where attention is needed. o Make functions static. o Functions with same argument types use same argument order. o Get rid of classic K&R style function declarations. Please notice that this patch _should not_ affect how program works e.g. this has no actual code changes. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* findmnt: minor coding style changesKarel Zak2011-04-271-21/+20Star
| | | | | | | * remove __<MACRONAME> from code * use 'static' for global variables Signed-off-by: Karel Zak <kzak@redhat.com>
* findmnt: filter filesystems and actions for --pollKarel Zak2011-04-272-15/+106
| | | | | | | | | | | | | | | | | | The patch allows to filter by: * actions name: $ findmnt --poll=umount * target, source, fstype, options: $ findmnt --poll /mnt/test $ findmnt --poll -O ro $ findmnt --poll -t ext4 * --first-only option to wait only for the first matching change: $ findmnt --poll=umount --first-only /mnt/test Signed-off-by: Karel Zak <kzak@redhat.com>
* findmnt: print OLD-* columns only when necessaryKarel Zak2011-04-271-3/+5
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* findmnt: add --poll and --timeout to the man pageKarel Zak2011-04-271-0/+22
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* findmnt: add --timeout optionKarel Zak2011-04-272-6/+17
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* findmnt: add --poll optionKarel Zak2011-04-271-29/+232
| | | | | | | | | | | | | The --poll functionality is based on poll(/proc/self/mountinfo) and mnt_tabdiff_* functions from libmount. $ findmnt --poll ACTION TARGET SOURCE FSTYPE OPTIONS mount /mnt/test /dev/sda1 ext3 rw,relatime,errors=continue,user_xattr,acl,barrier=0,data=ordered ... after "mount /dev/sda1 /mnt/test". Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: minor fix to mnt_tabdiff_*Karel Zak2011-04-274-7/+11
| | | | | | | - tabdiff has to support NULL fs->source - disable some debug messages Signed-off-by: Karel Zak <kzak@redhat.com>
* lib: [tt.c] support fixed width and multiple tt_print_table() callsKarel Zak2011-04-272-5/+40
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: add mnt_tabdiff_* functionsKarel Zak2011-04-2615-2/+530
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: add mnt_reset_table()Karel Zak2011-04-263-5/+26
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: support NULL source path for mnt_table_find_* functionsKarel Zak2011-04-263-16/+33
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: non-linux fixupSamuel Thibault2011-04-211-1/+1
| | | | Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
* libmount: add support for x-* mount commentsKarel Zak2011-04-215-7/+18
| | | | | | | | | | | | | | | | | | | | | | | The current way how add any comment or extra information to /etc/fstab is to use comment="" mount option. This is not too elegant and readable if you want to add more than one comment. It seems better to add any generic prefix that will be used for all 3rd-party userspace mount options. Expected syntax is: x-<application>-<options>[=<data>] For example: x-systemd-bar=managed All x-* options (as well as comment=) are ignored by libmount and not stored to the mtab file. Requested-by: Lennart Poettering <lennart@poettering.net> Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: don't run mount/regfile test on old kernelKarel Zak2011-04-191-1/+8
| | | | | | The /sys/.../loop/backing_file is available since 2.6.37. Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: add test for RLIMIT_FSIZE issueKarel Zak2011-04-194-0/+81
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: use libmount tab update tests for UID=0 onlyKarel Zak2011-04-191-0/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* getopt: fix gcc warningKarel Zak2011-04-192-2/+0Star
| | | | | | | getopt.c:80:13: warning: ‘set_initial_shell’ declared ‘static’ but never defined Signed-off-by: Karel Zak <kzak@redhat.com>
* mesg: add \n to usage() outputKarel Zak2011-04-141-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* mesg: man page clean wqupKarel Zak2011-04-141-5/+2Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* mesg: new --verbose optionSami Kerola2011-04-142-2/+14
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* mesg: add long options to the man pageSami Kerola2011-04-141-1/+10
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* mesg: use long options, also --help and --version addedSami Kerola2011-04-141-7/+30
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* agetty: coding style - fix identationKarel Zak2011-04-141-973/+938Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* agetty: coding style - fix comments, remove tailing whitespaceKarel Zak2011-04-141-51/+42Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* agetty: getopt case segment reorderingSami Kerola2011-04-141-28/+27Star
| | | | | | | | The case clause after getopts is in alphabetical order, just like option string definition and manual page. The patch also convers spaces to tabs in this code block. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* docs: agetty long optionsSami Kerola2011-04-141-34/+40
| | | | | | | | | Long options to manual page with the new --version and --help. The manual page option order is also set to be the same as it is in code. For the persons who don't see the order it is short option case in sensitive alphabetical order. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* agetty: symbolic standard file descriptorsSami Kerola2011-04-141-24/+25
| | | | | | | I find it easier to read code in which standard file descriptors are symbolic strings rather than numbers. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* agetty: #endif commentsSami Kerola2011-04-141-13/+13
| | | | | | | | The longer #ifdef ... #endif markups have now at the end section comment where they begun, which should improve preprosessor directive readability. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* agetty: error message about required argumentsSami Kerola2011-04-141-3/+6
| | | | | | | This patch also fixes only remaining magical number to EXIT_* markup. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* agetty: use long optionsSami Kerola2011-04-141-7/+63
| | | | | | | | | | | | | This patch will introducing --help and --version options, which does not have short version. Reason to this is a that the -h was already assigned. [kzak@redhat.com: - fix one usage call, - use %1$s in usage printf format - remove "static const" from enum] Signed-off-by: Sami Kerola <kerolasa@iki.fi> Signed-off-by: Karel Zak <kzak@redhat.com>
* agetty: use program_invocation_short_nameSami Kerola2011-04-141-19/+2Star
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* agetty: use xalloc.hSami Kerola2011-04-141-6/+4Star
| | | | | | Unifies and fixes malloc and strdup calls. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* libmount: use libmnt_lock for utab flockKarel Zak2011-04-133-102/+32Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: merge mtab and utab locking codeKarel Zak2011-04-132-94/+178
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: block signals when update utabKarel Zak2011-04-131-48/+81
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: more robust mtab and utab update (CVE-2011-1676, CVE-2011-1677)Karel Zak2011-04-131-39/+73
| | | | | | | | | | | | | | http://thread.gmane.org/gmane.comp.security.oss.general/4374 Changes: - always use temporary file - use fflush() for the temporary file - check fprintf() return value Signed-off-by: Karel Zak <kzak@redhat.com>
* mount: use lock from mnt_update_table()Karel Zak2011-04-134-29/+4Star
| | | | | | The mnt_update_table() is able to create a mtab lock now. Signed-off-by: Karel Zak <kzak@redhat.com>
* umount: block signals when umounting and updating mtab (CVE-2011-1676, ↵Karel Zak2011-04-131-0/+5
| | | | | | | | | | CVE-2011-1677) http://thread.gmane.org/gmane.comp.security.oss.general/4374 Based on CVE-2011-1089. Signed-off-by: Karel Zak <kzak@redhat.com>
* mount: use fflush() and temporary file for mtab updates (CVE-2011-1089)Karel Zak2011-04-122-28/+29
| | | | | | | | | | | | | | | | | | http://thread.gmane.org/gmane.comp.security.oss.general/4374 Changes: - force mount(8) to use /etc/mtab.tmp file every time. The original code used the tmp file for remount/move operations only. - call and check fflush() return code for the tmp file Note mount(8) blocks all signals when writing to mtab, so it's not affected by SIGXFSZ and the mtab lock file is always removed. This patch does not fix the same issue in umount(8) and libmount. Signed-off-by: Karel Zak <kzak@redhat.com>
* libblkid: remove test for non-zero head count in FAT superblock probe.Nick Holloway2011-04-123-2/+8
| | | | | | | | | | | | | | This change enables the auto-detection of the internal storage on a VTech Kidizoom camera, which has a zero head count value in the superblock. Microsoft documentation, "FAT: General Overview of On-Disk Format", states that the sectors and heads fields are only relevant for media that have a geometry. The Linux kernel also does not require a non-zero head count, and can manually mount the filesystem. Signed-off-by: Nick Holloway <Nick.Holloway@pyrites.org.uk>
* script: optional timing output file argument addedSami Kerola2011-04-122-9/+18
| | | | | | And update to manual page accordingly. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* docs: scriptreplay add note about new optionsSami Kerola2011-04-121-0/+11
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* scriptreplay: allow arguments as command line switchesSami Kerola2011-04-121-9/+28
| | | | | | | The command line switches override old style arguments Signed-off-by: Sami Kerola <kerolasa@iki.fi> Signed-off-by: Karel Zak <kzak@redhat.com>
* docs: scriptreplay mention basic long optionsSami Kerola2011-04-121-0/+7
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* scriptreplay: support long optionsSami Kerola2011-04-121-9/+38
| | | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi> Signed-off-by: Karel Zak <kzak@redhat.com>
* scriptreplay: end printing with new lineSami Kerola2011-04-121-0/+1
| | | | | | | Depending on opinion this is either modest bug fix or tiny improvement. Signed-off-by: Sami Kerola <kerolasa@iki.fi>