Karel Zak [Wed, 8 Jun 2011 10:27:03 +0000 (12:27 +0200)]
hwclock: remove unused variables
hwclock.c: In function ‘set_hardware_clock’:
hwclock.c:467:7: warning: variable ‘err’ set but not used [-Wunused-but-set-variable]
hwclock.c: In function ‘main’:
hwclock.c:1461:7: warning: variable ‘ARCconsole’ set but not used [-Wunused-but-set-variable]
Karel Zak [Wed, 8 Jun 2011 10:16:08 +0000 (12:16 +0200)]
blkid: don't free() uninitialized variable
blkid.c: In function ‘main’:
blkid.c:656:6: warning: ‘res’ may be used uninitialized in this function [-Wuninitialized]
blkid.c:623:9: note: ‘res’ was declared here
Karel Zak [Wed, 8 Jun 2011 09:32:53 +0000 (11:32 +0200)]
login: cleanup unused variables
login.c: In function ‘main’:
login.c:389:40: warning: variable ‘errsv’ set but not used [-Wunused-but-set-variable]
login.c:389:9: warning: variable ‘ask’ set but not used [-Wunused-but-set-variable]
Sami Kerola [Mon, 23 May 2011 20:42:15 +0000 (22:42 +0200)]
colrm: gotos, long options and argument checking
Unnecessary goto jumps where replaced by a simple function, and
two loops. Long options support help and version, and the two
arguments this command has are now validated with strtoul_or_err.
Davidlohr Bueso [Wed, 1 Jun 2011 22:32:56 +0000 (18:32 -0400)]
minix: add common functionality
Unite common features and code present in mkfs.minix and fsck.minix into a
single minix.h header. This eases the reading and modification of both
programs.
Futhermore:
- Replace version2 variable with fs_version (handy when v3 support
comes along)
- For superblock attributes and inode information, use small inline
functions instead of ugly macros.
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>