Sami Kerola [Sat, 21 May 2011 13:02:10 +0000 (15:02 +0200)]
build-sys: use AUTOMAKE_OPTIONS = gnu
The change will cause make dist to have INSTALL file from
automake release, which hopefully is more up to date than
manually maintained version.
The gnu option will also require ChangeLog to be present, and
without doubts no-one wants to maintain that manually. I added
file to reference link to internet git repository view.
At the time of make dist current tag is added to the ChangeLog
reference which will make release to point exactly to the point
where changes ended. Minor drawback is that untagged make dist
releases will contain a broken link in ChangeLog.
Karel Zak [Thu, 26 May 2011 07:54:13 +0000 (09:54 +0200)]
Merge branch 'column' of git://github.com/kerolasa/lelux-utiliteetit into column
* '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
Davidlohr Bueso [Tue, 10 May 2011 18:35:23 +0000 (14:35 -0400)]
chrt: clarify use of -a option
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().
Dr. Werner Fink [Tue, 10 May 2011 15:35:23 +0000 (17:35 +0200)]
aggety: further mingetty features
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.
Werner Fink [Mon, 9 May 2011 13:52:39 +0000 (15:52 +0200)]
agetty: add an autologin feature
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.
Dr. Werner Fink [Tue, 10 May 2011 15:34:30 +0000 (17:34 +0200)]
agetty: better support of virtual console
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.
Werner Fink [Mon, 9 May 2011 13:52:36 +0000 (15:52 +0200)]
agetty: proper session on the terminal line
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.
Werner Fink [Mon, 9 May 2011 13:52:35 +0000 (15:52 +0200)]
agetty: cleanup argv parsing, utmp update, use writeall(), etc.
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).
Werner Fink [Mon, 9 May 2011 13:52:34 +0000 (15:52 +0200)]
agetty: more code cleanup
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.
John Lindgren [Wed, 11 May 2011 18:32:18 +0000 (14:32 -0400)]
blkid: don't read past end of FAT32 cluster chain
When looking for a volume label on a FAT32 filesystem, blkid does not
correctly handle special cluster values in the range 0x0FFFFFF8 to
0x0FFFFFFF, which mark the last cluster in a chain. As a result, it
begins to read [what it treats as] FAT entries from past the end of the
FAT. Depending on the data read, it may then try to parse random data
from the filesystem (including user files, free space, and other
directories) as though it were part of the root directory.
Because parsing stops early when a volume label is found, the problem
only occurs on filesystems without a volume label. When it occurs, it
may result in a long sequence of lseek and read calls; on an older IDE
drive with a 2 GB FAT32 partition, this amounted to around 3 seconds of
disk I/O.
After patching, blkid stop parsing as soon as it reaches a cluster value
greater than or equal to the number of entries in the FAT.
[kzak@redhat.com: - add le32_to_cpu()]
Signed-off-by: John Lindgren <john.lindgren@tds.net>
Davidlohr Bueso [Tue, 10 May 2011 22:03:09 +0000 (18:03 -0400)]
taskset: make threads aware
Add a new '-a' option to view/modify the CPU affinity for an entire
group of threads belonging to a given PID. We create two new
functions, print_affinity() and do_taskset() for code simplification.
Example:
zeus@jilguero:~/src/util-linux/schedutils$ ./taskset -a -p 01 3142
pid 3142's current affinity mask: 2
pid 3142's new affinity mask: 1
pid 3164's current affinity mask: 2
pid 3164's new affinity mask: 1
pid 854's current affinity mask: 2
pid 854's new affinity mask: 1
[kzak@redhat.com: - clean up
- move variables to struct taskset]
Signed-off-by: Davidlohr Bueso <dave@gnu.org> Tested-by: Jonathan Gonzalez <zeus@gnu.org> Signed-off-by: Karel Zak <kzak@redhat.com>
sfdisk: returns non-zero on failed BLKRRPART ioctl
Make sfdisk(8) return non-zero value on failed BLKRRPART ioctl().
This will happen for either partition table re-reads after partition
changes or on explicit use of -R switch.
The function reread_disk_partition() was changed from 'void' to 'int'
and now returns a result to let the calling functions decide to exit(1).
Signed-off-by: Andrea Galbusera <gizero@gmail.com>
lsblk: add support for discard topology (-D option)
I got tired of poking around in sysfs to find the discard topology.
Here's a patch against lsblk that adds a -D option to present this
information in a human-readable form:
Davidlohr Bueso [Tue, 3 May 2011 18:57:01 +0000 (15:57 -0300)]
lib: [procutils.c]: general purpose procfs parsing functions
We include the following functions as a first approach:
- proc_open_tasks(): allocate resources and setup basic data
- proc_next_tid(): iterate over the thread group
- proc_close_tasks(): free used resources
[kzak@redhat.com: - free() on error in proc_open_tasks(),
- always call free() in proc_close_tasks()
- ignore non-digit dirs and return 1 on end-of-dir
in proc_next_tid()]
Signed-off-by: Davidlohr Bueso <dave@gnu.org> Signed-off-by: Karel Zak <kzak@redhat.com>