mount -t cifs //127.0.0.1/users /mnt/smb -o user=root,password=linux
is incorrectly translated to
mount.cifs -o noexec,nosuid,nodev,user=root,password=linux ...
The command mount(8) should be sensitive to "user" (without "=<name>")
only. The correct cifs command line is:
mount.cifs -o user=root,password=linux
Addresses: https://bugzilla.novell.com/show_bug.cgi?id=766157
Signed-off-by: Karel Zak <kzak@redhat.com>
mount -t foo something /mnt/test -o user=root,password=linux
generates
"rw,noexec,nosuid,nodev,password=linux,,user=root"
options string for /sbin/mount.foo, the ",," is incorrect.
Signed-off-by: Karel Zak <kzak@redhat.com>
The libblkid always verify that /dev/disk/by-* symlinks match with
on-device LABELs/UUIDs. It means that all requests (e.g. mount -L |
-U) generates extra superblocks scans on the device.
Currently, many users and tools (GNOME, systemd, ...etc) use the
symlink directly and udev maintains the symlinks by inotify (+watch
rule). It seems better for system performance to disable the extra
paranoid mode and trust in udev.
Signed-off-by: Karel Zak <kzak@redhat.com>
# ll ~/xxx2
-rw-r--r-- 1 root root 500 Jun 12 14:30 /root/xxx2
old version:
# losetup -a
new version:
# losetup -a
/dev/loop0: [2052]:535312 (/root/xxx2)
The new version scans /sys/block/loopN, kernel >= 2.6.37 is required
otherwise fallback to the original not-so-smart /proc/partitions scan.
Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=730266
Signed-off-by: Karel Zak <kzak@redhat.com>
properly implemented fdisk_dev_has_topology() requires optimal
I/O size to detect that the device provides topology.
Unfortunately, currently used cxt->io_size maybe overwritten in
__discover_topology() to min_io_size.
This patch introduces cxt->optimal_io_size and keeps it independent on
cxt->io_size. The cxt->io_size is I/O size used by fdisk for alignment
calculation.
Signed-off-by: Karel Zak <kzak@redhat.com>
This patch adds device topology discovery to the internal API. This
functionality is static only to the API and therefore hidden from general fdisk
code. Functionality itself doesn't really change, min_io_size, io_size, logical
and physical sector sizes and alignment offset are added to the fdisk_context
structure and elements are accessed from there. The logical sector size
(sector_size) is now unsigned long instead of unsigned int, this as no effect
otherwise.
A few things to notice:
- The patch is larger than I wanted but we need to modify function parameters
across fdisk and its labels to use the topology data from cxt-> instances.
Hopefully this will be pretty much it regarding this kind of modifications -
perhaps geometry will need something of the like too.
- The -b option must override internal discovery.
- A new helper function has added to verify if the device provides topology
information, this replaces the 'has_topology' global variable.
Signed-off-by: Davidlohr Bueso <dave@gnu.org>
This program heavily uses global variables, which isn't very elegant and can
lead to nasty bugs. Modify functions that use fdisk's context current features
(descriptor and path), to receive the context as a parameter instead of
globally. This includes DOS, SUN, SGI and BSD label code. Another benefit that
comes with this is that as the API grows all the information regarding fdisk
will be accessible from this structure so we can reduce even more global
variables and simply code.
This patch passed:
- building
- regression tests
- local dos/sun/bsd partition changes
Signed-off-by: Davidlohr Bueso <dave@gnu.org>
Recently, commit 0a86755fe8 directed the welcome
message output from stderr to stdout breaking regression tests. Correct this
by flushing stdout and stop buffering the output - a trivial function is
created as well.
Signed-off-by: Davidlohr Bueso <dave@gnu.org>
* '2012wk22' of git://github.com/kerolasa/lelux-utiliteetit:
docs: clean up getopt.1 manual
docs: clean up dmesg.1 manual
docs: clean up chcpu.8 manual
fileutils: xmkstemp() interface change
docs: fix all man page groff warnings
tools: add checkmans.sh
docs: clean up wdctl.8 manual
docs: clean up login.1 manual
login: allow TTYGROUP name begin by number
build-sys: add su executable to .gitignore
logindefs: change getlogindefs_num() to return unsigned long
Conflicts:
login-utils/su.c
sys-utils/dmesg.1
Fixes a bug in option string parsing wherein a line such as:
ro,relatime,,nosuid,nodev
Will be seen as only the tokens "ro" and "relatime" after the parser
encounters a zero length (and erroneously declared NULL) option.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Some libc do not expose program_invocation_short_name. Therefore util-linux
comes with helpers in 'c.h'. Use the 'c.h' in hexsyntax.c where it was missed.
This patch fixes following error for me:
---8<---
hexsyntax.c: In function 'newsyntax':
hexsyntax.c:115: error: 'program_invocation_short_name' undeclared (first use in this function)
hexsyntax.c:115: error: (Each undeclared identifier is reported only once
hexsyntax.c:115: error: for each function it appears in.)
--->8---
Signed-off-by: Andreas Bießmann <biessmann@corscience.de>
regexec only returns 0 or REG_NOMATCH so remove a meaningless test
Signed-off-by: Jeremy Huntwork <jhuntwork@lightcubesolutions.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
* Add lightness to synopsis.
* Add spaces after dots (English spacing).
* Replace backticks by ticks.
* Reformat text to be 70 characters wide.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>