Davidlohr Bueso [Wed, 29 Jun 2011 16:55:49 +0000 (12:55 -0400)]
mkfs.minix: add minix v3 support
We can now create minix v3 filesystems. Support for this fs was added a few
years ago in the Linux kernel. One of the most important benefits is the
ability to handle file names up to 60 characters long. With this change we
also introduce the -3 option which naturally indicates which version to create.
Version 1 is still left as the default one for backwards compatibility reasons.
[kzak@redhat.com: - fix gcc warnings:
mkfs.minix.c: In function ‘super_set_state_ptr’:
mkfs.minix.c:174:1: warning: no return statement in function returning non-void [-Wreturn-type]
mkfs.minix.c: In function ‘write_tables’:
mkfs.minix.c:182:7: warning: unused variable ‘state’ [-Wunused-variable]
mkfs.minix.c: At top level:
mkfs.minix.c:111:27: warning: ‘blksz’ defined but not used [-Wunused-variable]
]
Signed-off-by: Davidlohr Bueso <dave@gnu.org> Signed-off-by: Karel Zak <kzak@redhat.com>
Sami Kerola [Tue, 28 Jun 2011 21:49:34 +0000 (23:49 +0200)]
docs: add long options to mkfs.8
Two switches -c and -l where removed from manual, they might be
supported by the real file system builder but not necessarily.
The -v option was also corrected to be -V.
Karel Zak [Wed, 29 Jun 2011 10:12:48 +0000 (12:12 +0200)]
Merge branch 'sfdisk' of git://github.com/kerolasa/lelux-utiliteetit
* 'sfdisk' of git://github.com/kerolasa/lelux-utiliteetit:
Merge branch 'master', remote-tracking branch 'upstream/master'
sfdisk: fix for data type mismatches
sfdisk: fix implicit overflow
docs: sfdisk manual update
sfdisk: previously undocumented options to usage
sfdisk: help screen format
sfdisk: declare unused function attributes
Petr Uzel [Wed, 29 Jun 2011 08:24:09 +0000 (10:24 +0200)]
umount: do not hang with disconnected NFS mounts
Since util-linux commit f4612577c942a3683b97632ad0b49671897c2070,
umount stat(2)s its argument to check whether it can be associated
with some loop device. This could hang with broken NFS mounts.
Fix by first checking mtab if umount's argument is mounted and only if
we fail, check if there is a loop device associated.
Karel Zak [Mon, 27 Jun 2011 15:21:57 +0000 (17:21 +0200)]
Merge branch 'wknd23' of git://github.com/kerolasa/lelux-utiliteetit
* 'wknd23' of git://github.com/kerolasa/lelux-utiliteetit: (41 commits)
getopt: fix coding style
getopt: options struct, usage and version outputs
build-sys: remove unnecessary files from getopt
getopt: make user getopt_long parsing to use function pointer
getopt: remove unnecessary free()
getopt: use xalloc.h
docs: look.1 manual rewrote
look: add long options
docs: mention long options in uuidd.8 manual page
uuidd: coding style fixes
uuidd: remove goto statement
uuidd: use symbolic exit and return values
uuidd: die() function removed
uuidd: long options & new usage
docs: uuidgen.1 mention long options
uuidgen: add long options
wipefs: add version printing & compiler warning
write: maintenance fixes
write: long options & new usage
build-sys: move write to term-utils directory
...
Sami Kerola [Sat, 25 Jun 2011 14:32:11 +0000 (16:32 +0200)]
getopt: fix coding style
This patch is purely reindentation, spacing, tabing, comment line
lenght and so on style fix. The only potential cause of havok is
two fixed ambiguous assignments which very likely did not break.
Sami Kerola [Mon, 13 Jun 2011 11:47:29 +0000 (13:47 +0200)]
getopt: options struct, usage and version outputs
Move commands own option structure from global scope into main(),
and make it as read-only. The usage() ouput mechanims is made to
look more like other commands.
Misleading old version string `getopt (enhanced) 1.1.4' is
replaced to look like the other util-linux version outputs. If
anyone is relying on identifying the command by that string he
should use -T option instead.
Sami Kerola [Sat, 11 Jun 2011 21:42:45 +0000 (23:42 +0200)]
docs: rename.1 verbose, long options and warning
Add new verbose and long options to manual page. I also added
warning section which hopefully gets read by people who run the
command first time.
It might be good idea to make the rename such that it would not
overwrite by default, and have a --force option if an use wants
that. In current state the rename is somewhat dangerous.
Sami Kerola [Sat, 11 Jun 2011 21:21:31 +0000 (23:21 +0200)]
rename: verbose option & maintenance fixes
The rename has new verbose option which will print which files
where renamed. Maintenance fixes includes long options, coding
style and freeing memory after usage.
Sami Kerola [Sat, 11 Jun 2011 20:27:18 +0000 (22:27 +0200)]
docs: inform about cal long options
The parameters section is now split per a parameter, which I
found more readable than the previous layout. In addition the
nroff syntax is changed to be closer what help2man is suggesting
it should be.
Sami Kerola [Sat, 25 Jun 2011 11:05:12 +0000 (13:05 +0200)]
whereis: warnings, exit values, braces and returns
Compiler type mismatch warning fixed, symbolic exit value taken
in use where missing, unnecessary single statement 'block' braces
removed and return is not a function bracing fixed.
Sami Kerola [Sat, 11 Jun 2011 14:45:53 +0000 (16:45 +0200)]
namei: fix to argument handling
Missing pathname argument can only be checked after options are
parsed. Earlier for example 'namei -l' print nothing and was
successful.
The option parsing is changed to be less POSIXLY_CORRECT and
continue if nonoption argument is found, which allows users to
define options and arguments in the order they prefer.
Unknown short options, which earlier matched case '?' that was
help option alias, are now made to indicate failure in return
value.
Samuel Thibault [Mon, 20 Jun 2011 10:48:35 +0000 (12:48 +0200)]
misc: hurd build fixes
* Make blkdev_is_misaligned return 0 when BLKALIGNOFF is not available.
* Make procutils.c include c.h to get a PATH_MAX replacement.
* Provide agetty.c USE_SYSLOG, DEFAULT_VCTERM and DEFAULT_STERM
defaults for Hurd.
* Make agetty.c only deal with OFDEL, XCASE and VSWTCH if they are
available.
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Signed-off-by: Karel Zak <kzak@redhat.com>