summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* column: fix problems with uninitialized variablesKarel Zak2011-05-261-8/+9
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* Merge branch 'column' of git://github.com/kerolasa/lelux-utiliteetit into columnKarel Zak2011-05-2610-96/+203
|\ | | | | | | | | | | | | | | | | | | | | | | * 'column' of git://github.com/kerolasa/lelux-utiliteetit: tests: add column tests column.c: global variables removed column.c: validate numeric user inputs column.c: free memory before exit column.c: make table function clarification column.c: coding style fixes column.c: add version printing column.c: replace emalloc with xcalloc
| * tests: add column testsSami Kerola2011-05-198-0/+83
| | | | | | | | | | | | | | | | Very basic regression tests for the column(1) command. http://permalink.gmane.org/gmane.linux.utilities.util-linux-ng/4066 Signed-off-by: Sami Kerola <kerolasa@iki.fi>
| * column.c: global variables removedSami Kerola2011-05-191-50/+63
| | | | | | | | | | | | | | Variables from global scope are moved to main, and passed as function arguments where ever they are needed. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
| * column.c: validate numeric user inputsSami Kerola2011-05-192-3/+11
| | | | | | | | | | | | | | Use strtol_or_err from strutils.h to check numeric user input is sane. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
| * column.c: free memory before exitSami Kerola2011-05-191-0/+13
| | | | | | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
| * column.c: make table function clarificationSami Kerola2011-05-191-14/+17
| | | | | | | | | | | | | | Readability enchancement, and few variable type changes to be more proper. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
| * column.c: coding style fixesSami Kerola2011-05-011-23/+17Star
| | | | | | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
| * column.c: add version printingSami Kerola2011-05-011-2/+7
| | | | | | | | | | | | | | The patch makes return value to be non-zero when command line short option is unknown. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
| * column.c: replace emalloc with xcallocSami Kerola2011-05-011-20/+8Star
| | | | | | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* | build-sys: cleanup lib/ testsKarel Zak2011-05-253-6/+11
| | | | | | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* | libblkid: improve blkid__scan_dirKarel Zak2011-05-241-2/+6
| |
* | docs: TODO updateKarel Zak2011-05-241-0/+12
| | | | | | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* | libblkid: add ID_PART_ENTRY_{OFFSET,SIZE,DISK}Karel Zak2011-05-232-1/+10
| | | | | | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* | libblkid: use partno for partitions mapped by DMKarel Zak2011-05-231-4/+44
| | | | | | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* | libblkid: found whole-disk for partitions mapped by kpartxKarel Zak2011-05-231-97/+119
| | | | | | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* | lib: [sysfs.c] add sysfs_readlink and name/path functionsKarel Zak2011-05-182-16/+130
| | | | | | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* | lib: [at.c] add readlink_at(), fix semantic for absolute pathsKarel Zak2011-05-182-12/+45
| | | | | | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* | agetty: try next speed after CBREAKKarel Zak2011-05-181-1/+1
| | | | | | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* | lsblk: use sysfs_read_u64() rather than sysfs_strdup() + atol()Karel Zak2011-05-181-7/+19
| | | | | | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* | lib: [sysfs.c] make sysfs_read_* function more robustKarel Zak2011-05-186-25/+70
| | | | | | | | | | | | | | The functions does not modify result if the requested sysfs attribute does not exist. Signed-off-by: Karel Zak <kzak@redhat.com>
* | build-sys: disable lib/ at.c tests buildingKarel Zak2011-05-181-2/+2
| | | | | | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* | lsblk: improve discard supportMartin K. Petersen2011-05-181-4/+9
| | | | | | | | | | | | | | | | | | | | Use atol() instead of atoi() when extracting discard_max_bytes. Only print discard_alignment and discard_zeroes_data if the device supports discard. This prevents printing of undefined values with older kernels. Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* | cramfs: remove cramfs_common.hDavidlohr Bueso2011-05-176-41/+32Star
| | | | | | | | | | | | | | We currently have cramfs.h and cramfs_common.h, this makes no sense, so remove unite them and keep just cramfs.h Signed-off-by: Davidlohr Bueso <dave@gnu.org>
* | chrt: clarify use of -a optionDavidlohr Bueso2011-05-171-1/+1
| | | | | | | | | | | | | | With this option we can operate on all the thread group of a process not just for changes, but also when obtaining information via sched_getscheduler(). Signed-off-by: Davidlohr Bueso <dave@gnu.org>
* | ul.c: warn user when command chooses term typeSami Kerola2011-05-171-2/+5
| | | | | | | | | | | | | | Happens usually when user specifies garbage as -t argument. Signed-off-by: Sami Kerola <kerolasa@iki.fi> Signed-off-by: Karel Zak <kzak@redhat.com>
* | ul.c: escape handling refactoredSami Kerola2011-05-171-34/+42
| | | | | | | | | | | | | | Separate function for escape handling to make switch statement more readable. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* | ul.c: close files and free memory after usageSami Kerola2011-05-171-0/+2
| | | | | | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* | ul.c: code style and comment fixesSami Kerola2011-05-171-72/+94
| | | | | | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* | ul.c: fix compier warningsSami Kerola2011-05-171-2/+2
| | | | | | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* | ul.c: magic constant removalSami Kerola2011-05-171-8/+7Star
| | | | | | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* | ul.c: use long optionsSami Kerola2011-05-171-5/+35
| | | | | | | | | | | | This commit introduces help & version options. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* | ul.c: convert definition to functionSami Kerola2011-05-171-16/+22
| | | | | | | | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi> Signed-off-by: Karel Zak <kzak@redhat.com>
* | agetty: don't use xalloc.h stuffKarel Zak2011-05-171-8/+17
| | | | | | | | | | | | | | agetty logs errors and warnings to syslog, we shouldn't use err.h stuff here. Signed-off-by: Karel Zak <kzak@redhat.com>
* | agetty: remove unnecessary options synonymsKarel Zak2011-05-172-16/+11Star
| | | | | | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* | agetty: use a generic function for strings concatenationKarel Zak2011-05-171-50/+60
| | | | | | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* | agetty: remove unnecessary space and "(void)" junkKarel Zak2011-05-171-68/+71
| | | | | | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* | aggety: further mingetty featuresDr. Werner Fink2011-05-172-38/+146
| | | | | | | | | | | | | | | | | | | | | | Allow the system adminstrator to provide options to the login program. Some changes for several layouts of the agetty prompt like short host name or full qualified host name. Four options enables the user to delay agetty after start, to change the working directory, to change the root directory, and to modified scheduling priority. Signed-off-by: Werner Fink <werner@suse.de>
* | agetty: add an autologin featureWerner Fink2011-05-172-26/+222
| | | | | | | | | | | | | | | | | | Add an autologin feature to agetty, that is that a user can be automatically logged in. For this the options of for the login program has to used. Make it possible to pass-through options to the login program which requires a security check. Signed-off-by: Werner Fink <werner@suse.de>
* | agetty: better support of virtual consoleDr. Werner Fink2011-05-171-61/+126
| | | | | | | | | | | | | | | | Better support of virtual console due support of UTF-8 login names provided by e.g. LDAP. Set default size 24/80 on serial modem lines if not found by the kernel. Signed-off-by: Werner Fink <werner@suse.de>
* | agetty: check virtual console for UTF-8 supportWerner Fink2011-05-171-9/+115
| | | | | | | | | | | | | | Check out a virtual console line for UTF-8 support, also skip modem specific setups on a virtual console line. Signed-off-by: Werner Fink <werner@suse.de>
* | agetty: proper session on the terminal lineWerner Fink2011-05-172-35/+126
| | | | | | | | | | | | | | | | | | | | Ensure a proper session on the terminal line, that is do a vhangup() and become the controlling terminal. After this determine if the terminal line a virtual console by using the ioctl TIOCMGET to get the status modem bits of a serial line which is a invalid argument on a virtual console. Signed-off-by: Werner Fink <werner@suse.de>
* | agetty: cleanup argv parsing, utmp update, use writeall(), etc.Werner Fink2011-05-172-205/+245
| | | | | | | | | | | | | | | | | | | | | | Next cleanup, that is split off special character parsing in do_prompt() and parse_args(), handle name of line of virtual console and use it in utmp update as well as the session id. Also move the initial TERM variable to open_tty() as we use this later in open_tty(). Use writeall() but avoid repeat to often for EAGAIN (compare with info page of the (g)libc, description of the macro EAGAIN). Signed-off-by: Werner Fink <werner@suse.de>
* | agetty: more code cleanupWerner Fink2011-05-171-84/+80Star
| | | | | | | | | | | | | | | | More code cleanup, that is use bit mask for eight bit option, use modern speed_t type, split local error() into local log_err(), log_warn(), and dolog() for fine graduated logging with syslogger. Signed-off-by: Werner Fink <werner@suse.de>
* | libblkid: use stuff from sysfs.h and at.hKarel Zak2011-05-168-167/+75Star
| | | | | | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* | lsblk: use generic sysfs functionsKarel Zak2011-05-162-202/+50Star
| | | | | | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* | lib: add generic sysfs utilsKarel Zak2011-05-165-2/+412
| | | | | | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* | libblkid: use cached buffers for nested PT probingKarel Zak2011-05-162-23/+41
| | | | | | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* | libblkid: make whole disk probing more robustKarel Zak2011-05-163-63/+103
| | | | | | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* | tests: update for recent fdisk changesKarel Zak2011-05-169-91/+115
| | | | | | | | Signed-off-by: Karel Zak <kzak@redhat.com>