]> git.ipfire.org Git - thirdparty/util-linux.git/log
thirdparty/util-linux.git
10 years agolosetup: don't require 512-byte aligned offsets
Karel Zak [Tue, 1 Oct 2013 13:52:11 +0000 (15:52 +0200)] 
losetup: don't require 512-byte aligned offsets

Kernel aligns the device size, but the offset where the device starts
is not required to be aligned.

 # losetup --offset 32 -f file.img

is just fine, the final size of the look device will be (in sectors)

  (backing_file_size - offset) >> 9

so we have to do the same in userspace when we check for successful
set capacity ioctl.

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agoMerge branch 'master' of https://github.com/yurchor/util-linux
Karel Zak [Mon, 30 Sep 2013 13:56:31 +0000 (15:56 +0200)] 
Merge branch 'master' of https://github.com/yurchor/util-linux

10 years agobash-completion: use '\n' as IFS when ask for filenames
Karel Zak [Mon, 30 Sep 2013 13:49:00 +0000 (15:49 +0200)] 
bash-completion: use '\n' as IFS when ask for filenames

The bash completion for more(1) treats the space-separated pieces of
filenames as different files.

$ touch foo\ bar
$ more foo<TAB>
bar foo

Reported-by: Ángel González <ingenit@zoho.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agotextual: fix misspelled words in -rc1
Karel Zak [Mon, 30 Sep 2013 11:58:53 +0000 (13:58 +0200)] 
textual: fix misspelled words in -rc1

Reported-by: Rafael Ferreira <rafael.f.f1@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agolibmount: Save errno if mkostemp() failed
Namhyung Kim [Sun, 29 Sep 2013 10:11:37 +0000 (19:11 +0900)] 
libmount: Save errno if mkostemp() failed

After mkostemp() failed, umask() and free() might alter the errno
to another value.  Not sure those calls really changes the errno
or not.  But let's be more conservative.

Signed-off-by: Namhyung Kim <namhyung@gmail.com>
10 years agobuild-sys: simplify python detection
Sami Kerola [Sun, 29 Sep 2013 09:51:13 +0000 (10:51 +0100)] 
build-sys: simplify python detection

This allows './configure --enable-most-builds' and 'make distcheck' to
work when both python2 and python3 are installed, and user has set python
version preference using symlink and PATH order.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
10 years agoclean up term lib handling
Mike Frysinger [Sun, 29 Sep 2013 04:44:43 +0000 (00:44 -0400)] 
clean up term lib handling

The ncurses package has been providing pkg-config files for a while now.
So let's start using them to get the proper linker & compiler flags.  It
can make a difference when ncurses is configured in a way that requires
extra link time flags but util-linux doesn't provide them, or when the
headers live in a weird place and util-linux can't find them.

Since the NCURSES_LIBS is always defined for the Makefile, there's no need
to gate on the HAVE_NCURSES conditional.  When it's disabled, the var will
simply be empty.

With a minor tweak to how tinfo is handled, we can do the same thing -- we
just always use TINFO_LIBS in the Makefile's.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
10 years agosetterm: fix term.h/ncurses.h include ordering
Mike Frysinger [Sun, 29 Sep 2013 04:44:36 +0000 (00:44 -0400)] 
setterm: fix term.h/ncurses.h include ordering

The ncurses term.h header has logic in it to detect if nucrses.h has
already been included and void defining things when it has.  But since
setterm includes term.h and the ncurses.h, it doesn't work and we can
get fun build-time warnings like:

  CC       term-utils/setterm-setterm.o
In file included from term-utils/setterm.c:109:0:
/usr/include/ncursesw/ncurses.h:827:12: warning: redundant redeclaration of 'tigetflag' [-Wredundant-decls]
 extern NCURSES_EXPORT(int) tigetflag (NCURSES_CONST char *);  /* implemented */
            ^
In file included from term-utils/setterm.c:106:0:
/usr/include/ncursesw/term.h:775:12: note: previous declaration of 'tigetflag' was here
 extern NCURSES_EXPORT(int) tigetflag (NCURSES_CONST char *);
            ^

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
10 years agofindmnt: always allocate memory for cell value
Dave Reisner [Sat, 28 Sep 2013 22:22:43 +0000 (18:22 -0400)] 
findmnt: always allocate memory for cell value

Since b3386c83fe77, findmnt's output uses TT_FL_FREEDATA, which causes
a crash here when string literal is returned instead of a heap address.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
10 years agonologin: add new command
Karel Zak [Mon, 30 Sep 2013 11:36:26 +0000 (13:36 +0200)] 
nologin: add new command

Currently it's maintained as distro specific (or people use impolite
/bin/false way).

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agoFix various typos
Yuri Chornoivan [Sat, 28 Sep 2013 10:33:59 +0000 (13:33 +0300)] 
Fix various typos

10 years agobuild-sys: release++ (v2.24-rc1) v2.24-rc1
Karel Zak [Fri, 27 Sep 2013 12:34:41 +0000 (14:34 +0200)] 
build-sys: release++ (v2.24-rc1)

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agodocs: update v2.24-ReleaseNotes
Karel Zak [Fri, 27 Sep 2013 12:27:10 +0000 (14:27 +0200)] 
docs: update v2.24-ReleaseNotes

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agobuild-sys: one install dir for all pylibmount stuff
Karel Zak [Fri, 27 Sep 2013 12:06:14 +0000 (14:06 +0200)] 
build-sys: one install dir for all pylibmount stuff

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agobuild-sys: fix lastb symlink
Karel Zak [Fri, 27 Sep 2013 12:02:58 +0000 (14:02 +0200)] 
build-sys: fix lastb symlink

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agopo: merge changes
Karel Zak [Fri, 27 Sep 2013 10:28:06 +0000 (12:28 +0200)] 
po: merge changes

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agotests: update build tests
Karel Zak [Fri, 27 Sep 2013 10:19:14 +0000 (12:19 +0200)] 
tests: update build tests

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agobuild-sys: fix static builds
Karel Zak [Fri, 27 Sep 2013 10:03:33 +0000 (12:03 +0200)] 
build-sys: fix static builds

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agolibblkid: update docs
Karel Zak [Fri, 27 Sep 2013 08:38:47 +0000 (10:38 +0200)] 
libblkid: update docs

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agolibmount: update docs
Karel Zak [Fri, 27 Sep 2013 08:38:39 +0000 (10:38 +0200)] 
libmount: update docs

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agoumount: provide more helpful error message
Karel Zak [Fri, 27 Sep 2013 08:06:44 +0000 (10:06 +0200)] 
umount: provide more helpful error message

non-root user on device that is not mounted:

 $ umount /mnt/flash
 umount: /mnt/flash: umount failed: Operation not permitted

this is true, because we cannot evaluate permissions as there is no
entry in mtab, but users expect something more helpful -- for example

 umount: /mnt/flash: not mounted

References: https://bugs.archlinux.org/task/31647
Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agolibmount: small cleanup in umount code
Karel Zak [Fri, 27 Sep 2013 08:06:09 +0000 (10:06 +0200)] 
libmount: small cleanup in umount code

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agodocs: add v2.24-ReleaseNotes
Karel Zak [Thu, 26 Sep 2013 14:17:01 +0000 (16:17 +0200)] 
docs: add v2.24-ReleaseNotes

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agomount: add notes about UUIDs to the man page
Karel Zak [Thu, 26 Sep 2013 13:42:54 +0000 (15:42 +0200)] 
mount: add notes about UUIDs to the man page

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agolibmount: compose mount.<type> helpers paths more carefully
Karel Zak [Thu, 26 Sep 2013 12:45:14 +0000 (14:45 +0200)] 
libmount: compose mount.<type> helpers paths more carefully

The [u]mount helper path is "/sbin/mount.<type>", the <type> should not
be possible to interpret like a path, for example:

  # mkdir /sbin/mount.fake
  # mount -t fake/../../../home/user/foo.sh

Anyway, this is *not mount(8) security issue*, because:

  - non-root users don't have permissions to specify -t on mount(8)
    command line
  - /sbin is not writable for regular users

This patch makes libmount more robust for situations when the library
is used by incompetent developers who don't sanitize user's input.

Reported-by: "Horsfall, Matthew" <mhorsfal@akamai.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agobuild-sys: add pylibmount __init__.py EXTRA_DIST
Karel Zak [Thu, 26 Sep 2013 12:02:40 +0000 (14:02 +0200)] 
build-sys: add pylibmount __init__.py EXTRA_DIST

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agobuild-sys: fix ${prefix} usage, be more verbose about py paths
Karel Zak [Thu, 26 Sep 2013 11:15:10 +0000 (13:15 +0200)] 
build-sys: fix ${prefix} usage, be more verbose about py paths

 - incorrect ${prefix} and ${exec_prefix} usage in AC_CASE
   (bug introduced by commit 9f57e6e8)

 - disable python by default (you have to use --with-python)

 - add python paths to the finale ./configure info message

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agobuild-sys: install to the correct python dirs
Karel Zak [Thu, 26 Sep 2013 10:55:30 +0000 (12:55 +0200)] 
build-sys: install to the correct python dirs

It seems we have to call AM_PATH_PYTHON() monster to get
pyexec (shared libs) and python (scripts) directories.

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agodocs: update AUTHORS file
Karel Zak [Thu, 26 Sep 2013 10:07:45 +0000 (12:07 +0200)] 
docs: update AUTHORS file

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agopo: merge changes
Karel Zak [Thu, 26 Sep 2013 10:01:10 +0000 (12:01 +0200)] 
po: merge changes

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agopo: update zh_TW.po (from translationproject.org)
Wei-Lun Chao [Thu, 26 Sep 2013 09:47:14 +0000 (11:47 +0200)] 
po: update zh_TW.po (from translationproject.org)

10 years agopo: update zh_CN.po (from translationproject.org)
Wylmer Wang [Thu, 26 Sep 2013 09:47:14 +0000 (11:47 +0200)] 
po: update zh_CN.po (from translationproject.org)

10 years agopo: update vi.po (from translationproject.org)
Trần Ngọc Quân [Thu, 26 Sep 2013 09:47:14 +0000 (11:47 +0200)] 
po: update vi.po (from translationproject.org)

10 years agopo: update util-linux.pot (from translationproject.org)
FULL NAME [Thu, 26 Sep 2013 09:47:14 +0000 (11:47 +0200)] 
po: update util-linux.pot (from translationproject.org)

10 years agopo: update uk.po (from translationproject.org)
Yuri Chornoivan [Thu, 26 Sep 2013 09:47:14 +0000 (11:47 +0200)] 
po: update uk.po (from translationproject.org)

10 years agopo: update tr.po (from translationproject.org)
Nilgün Belma Bugüner [Thu, 26 Sep 2013 09:47:13 +0000 (11:47 +0200)] 
po: update tr.po (from translationproject.org)

10 years agopo: update sv.po (from translationproject.org)
Daniel Nylander [Thu, 26 Sep 2013 09:47:13 +0000 (11:47 +0200)] 
po: update sv.po (from translationproject.org)

10 years agopo: update sl.po (from translationproject.org)
Simon Mihevc [Thu, 26 Sep 2013 09:47:13 +0000 (11:47 +0200)] 
po: update sl.po (from translationproject.org)

10 years agopo: update ru.po (from translationproject.org)
Pavel Maryanov [Thu, 26 Sep 2013 09:47:13 +0000 (11:47 +0200)] 
po: update ru.po (from translationproject.org)

10 years agopo: update pt_BR.po (from translationproject.org)
Rodrigo Stulzer Lopes [Thu, 26 Sep 2013 09:47:13 +0000 (11:47 +0200)] 
po: update pt_BR.po (from translationproject.org)

10 years agopo: update pl.po (from translationproject.org)
Jakub Bogusz [Thu, 26 Sep 2013 09:47:13 +0000 (11:47 +0200)] 
po: update pl.po (from translationproject.org)

10 years agopo: update nl.po (from translationproject.org)
Benno Schulenberg [Thu, 26 Sep 2013 09:47:13 +0000 (11:47 +0200)] 
po: update nl.po (from translationproject.org)

10 years agopo: update ja.po (from translationproject.org)
Takeshi Hamasaki [Thu, 26 Sep 2013 09:47:13 +0000 (11:47 +0200)] 
po: update ja.po (from translationproject.org)

10 years agopo: update it.po (from translationproject.org)
Marco Colombo [Thu, 26 Sep 2013 09:47:13 +0000 (11:47 +0200)] 
po: update it.po (from translationproject.org)

10 years agopo: update id.po (from translationproject.org)
Arif E. Nugroho [Thu, 26 Sep 2013 09:47:13 +0000 (11:47 +0200)] 
po: update id.po (from translationproject.org)

10 years agopo: update hu.po (from translationproject.org)
Gabor Kelemen [Thu, 26 Sep 2013 09:47:13 +0000 (11:47 +0200)] 
po: update hu.po (from translationproject.org)

10 years agopo: update hr.po (from translationproject.org)
Tomislav Krznar [Thu, 26 Sep 2013 09:47:13 +0000 (11:47 +0200)] 
po: update hr.po (from translationproject.org)

10 years agopo: update gl.po (from translationproject.org)
Fran Diéguez [Thu, 26 Sep 2013 09:47:13 +0000 (11:47 +0200)] 
po: update gl.po (from translationproject.org)

10 years agopo: update fr.po (from translationproject.org)
David Prévot [Thu, 26 Sep 2013 09:47:13 +0000 (11:47 +0200)] 
po: update fr.po (from translationproject.org)

10 years agopo: update fi.po (from translationproject.org)
Lauri Nurmi [Thu, 26 Sep 2013 09:47:13 +0000 (11:47 +0200)] 
po: update fi.po (from translationproject.org)

10 years agopo: update eu.po (from translationproject.org)
Mikel Olasagasti Uranga [Thu, 26 Sep 2013 09:47:12 +0000 (11:47 +0200)] 
po: update eu.po (from translationproject.org)

10 years agopo: update et.po (from translationproject.org)
Meelis Roos [Thu, 26 Sep 2013 09:47:12 +0000 (11:47 +0200)] 
po: update et.po (from translationproject.org)

10 years agopo: update es.po (from translationproject.org)
Santiago Vila Doncel [Thu, 26 Sep 2013 09:47:12 +0000 (11:47 +0200)] 
po: update es.po (from translationproject.org)

10 years agopo: update de.po (from translationproject.org)
Arun Persaud [Thu, 26 Sep 2013 09:47:12 +0000 (11:47 +0200)] 
po: update de.po (from translationproject.org)

10 years agopo: update da.po (from translationproject.org)
Joe Hansen [Thu, 26 Sep 2013 09:47:12 +0000 (11:47 +0200)] 
po: update da.po (from translationproject.org)

10 years agopo: update cs.po (from translationproject.org)
Petr Písař [Thu, 26 Sep 2013 09:47:12 +0000 (11:47 +0200)] 
po: update cs.po (from translationproject.org)

10 years agopo: update ca.po (from translationproject.org)
Josep Puigdemont [Thu, 26 Sep 2013 09:47:12 +0000 (11:47 +0200)] 
po: update ca.po (from translationproject.org)

10 years agolast: fix man page groff warning
Karel Zak [Thu, 26 Sep 2013 09:31:17 +0000 (11:31 +0200)] 
last: fix man page groff warning

tbl:<standard input>:166: column separation specified for last column

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agomount: fix repeating words in the man page
Karel Zak [Thu, 26 Sep 2013 09:03:20 +0000 (11:03 +0200)] 
mount: fix repeating words in the man page

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agofdisk: use xalloc stuff
Karel Zak [Thu, 26 Sep 2013 08:58:03 +0000 (10:58 +0200)] 
fdisk: use xalloc stuff

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agolibfdisk: (bds) cleanup includes
Karel Zak [Thu, 26 Sep 2013 08:57:35 +0000 (10:57 +0200)] 
libfdisk: (bds) cleanup includes

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agobuild-sys: fix include Makemodule.am
Karel Zak [Thu, 26 Sep 2013 08:41:18 +0000 (10:41 +0200)] 
build-sys: fix include Makemodule.am

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agotests: improve cal --color test
Karel Zak [Thu, 26 Sep 2013 08:25:24 +0000 (10:25 +0200)] 
tests: improve cal --color test

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agolibblkid: Get rid of an unnecessary check
Karel Zak [Thu, 26 Sep 2013 07:48:33 +0000 (09:48 +0200)] 
libblkid: Get rid of an unnecessary check

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agolibmount: make mnt_fs_{ap,pre}pend_options() more robust
Karel Zak [Thu, 26 Sep 2013 07:45:22 +0000 (09:45 +0200)] 
libmount: make mnt_fs_{ap,pre}pend_options() more robust

We should not use the results from mnt_split_optstr() if the function
failed.

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agolibmount: Remove stale comment on mnt_context_mount()
Namhyung Kim [Wed, 25 Sep 2013 15:32:06 +0000 (00:32 +0900)] 
libmount: Remove stale comment on mnt_context_mount()

The commit f9906424 ("libmount: add post-mount checks to detect ro/rw")
added necessary check so the comment is not valid anymore.

Signed-off-by: Namhyung Kim <namhyung@gmail.com>
10 years agolibmount: Set each optstr's to NULL if failed
Namhyung Kim [Wed, 25 Sep 2013 15:32:05 +0000 (00:32 +0900)] 
libmount: Set each optstr's to NULL if failed

When mnt_split_optstr() failed in the middle, vfs, fs, user optstr's
are freed but not reset.  It can lead to double frees at the end of
mnt_fs_{ap,pre}pend_options().

Signed-off-by: Namhyung Kim <namhyung@gmail.com>
10 years agolibmount: Free splitted optstr's when error occurred
Namhyung Kim [Wed, 25 Sep 2013 15:32:04 +0000 (00:32 +0900)] 
libmount: Free splitted optstr's when error occurred

When strdup() failed, u, v and f optstr's should be freed.

Signed-off-by: Namhyung Kim <namhyung@gmail.com>
10 years agolibmount: Get rid of an unnecessary check
Namhyung Kim [Wed, 25 Sep 2013 15:32:03 +0000 (00:32 +0900)] 
libmount: Get rid of an unnecessary check

libmount_debug_mask was OR'ed to MNT_DEBUG_INIT so it should be non-null.
Thus the check is pointless.

Signed-off-by: Namhyung Kim <namhyung@gmail.com>
10 years agotests: update odd output fdisk test
Karel Zak [Wed, 25 Sep 2013 15:51:13 +0000 (17:51 +0200)] 
tests: update odd output fdisk test

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agoORIG_HEAD
Karel Zak [Wed, 25 Sep 2013 15:41:26 +0000 (17:41 +0200)] 
ORIG_HEAD
tests: update sun label test

 * add fdisk -l outputs (to make the test more usable)
 * use more usable geometry
 * don't expect that 'create sun label' oprations asks for C/H/S (we
   follows fdisk_context defaults)

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agofdisk: print geometry for dos-compatible mode too
Karel Zak [Wed, 25 Sep 2013 15:36:21 +0000 (17:36 +0200)] 
fdisk: print geometry for dos-compatible mode too

10 years agolibfdisk: (sun) make it more obvious why the first sector moved
Karel Zak [Wed, 25 Sep 2013 15:13:47 +0000 (17:13 +0200)] 
libfdisk: (sun) make it more obvious why the first sector moved

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agolibfdisk: improve fdisk_save_user_geometry()
Karel Zak [Wed, 25 Sep 2013 15:11:08 +0000 (17:11 +0200)] 
libfdisk: improve fdisk_save_user_geometry()

The functions should not overwrite old setting if the new value (C/H/S) is
zero.

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agolibfdisk: use context geometry in SGI and SUN
Karel Zak [Wed, 25 Sep 2013 13:34:34 +0000 (15:34 +0200)] 
libfdisk: use context geometry in SGI and SUN

 * don't call HDIO_GETGEO ioctls in the drivers
 * use context geometry (so user can overwrite it by -C/H/S options)
 * use default geometry is ioctl does not return anything

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agotests: remove remaining set -x
Karel Zak [Wed, 25 Sep 2013 13:33:40 +0000 (15:33 +0200)] 
tests: remove remaining set -x

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agotests: update lscpu tests
Karel Zak [Wed, 25 Sep 2013 12:23:48 +0000 (14:23 +0200)] 
tests: update lscpu tests

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agolibfdisk: fix possible floating point exception
Karel Zak [Wed, 25 Sep 2013 09:45:59 +0000 (11:45 +0200)] 
libfdisk: fix possible floating point exception

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agolibfdisk: gpt: loosen check fot pmbr size in lba
Davidlohr Bueso [Sun, 22 Sep 2013 03:45:16 +0000 (20:45 -0700)] 
libfdisk: gpt: loosen check fot pmbr size in lba

While most disk partitioning tools out there create a pMBR's size in lba
to be the lesser of the whole disk or 2Tib, Microsoft apparently does not[1].
It always sets the entry to the maximum 32-bit limitation - even though a
drive may be smaller than that.

Loosen this check and only verify that the size is either the whole disk
or 0xFFFFFFFF.  No tool in its right mind would set it to any value
other than these.

[1] http://thestarman.pcministry.com/asm/mbr/GPT.htm#GPTPT

Signed-off-by: Davidlohr Bueso <davidlohr@hp.com>
10 years agolibfdisk: gpt: avoid unnecessary pmbr check
Davidlohr Bueso [Sun, 22 Sep 2013 03:45:14 +0000 (20:45 -0700)] 
libfdisk: gpt: avoid unnecessary pmbr check

We only jump to the 'check_hybrid' label when a valid pmbr
is detected, so we need not recheck again. Move the label's
logic so it doesn't include the check.

Signed-off-by: Davidlohr Bueso <davidlohr@hp.com>
10 years agolscpu: report cpu min mhz
Davidlohr Bueso [Sun, 22 Sep 2013 03:43:40 +0000 (20:43 -0700)] 
lscpu: report cpu min mhz

The lscpu tool only shows the current and max CPU frequencies, however,
in many scenarios this is not enough. If there are energy saving situations
(like some CPUs being idle, or not fully used) the cpugov can lower this value.

Signed-off-by: Davidlohr Bueso <davidlohr@hp.com>
10 years agopylibmount: rewrite to be py2/py3 universal
Ondrej Oprala [Thu, 29 Aug 2013 12:57:04 +0000 (14:57 +0200)] 
pylibmount: rewrite to be py2/py3 universal

Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agobuild-sys: support --with-python[={2,3}]
Karel Zak [Fri, 20 Sep 2013 10:42:45 +0000 (12:42 +0200)] 
build-sys: support --with-python[={2,3}]

 * we use pkg-config to get CGLAGS and LIBS, use package specific
   config (e.g. python-config) is non-sense.

 * default is to follow distribution and use pkg-config module name
   "python". This is probably symlink to python2.pc or python3.pc.

 * --with-python=2 forces to pkg-module "python2 >= 2"

 * --with-python=3 forces to pkg-module "python3 >= 3"

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agolibmount: free username after check
Dave Reisner [Wed, 18 Sep 2013 14:15:29 +0000 (10:15 -0400)] 
libmount: free username after check

Leak reported by valgrind:

==14226== 7 bytes in 1 blocks are definitely lost in loss record 1 of 1
==14226==    at 0x4C2757B: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==14226==    by 0x5534839: strdup (in /usr/lib/libc-2.18.so)
==14226==    by 0x4E53FE0: mnt_get_username (utils.c:560)
==14226==    by 0x4E456A5: mnt_context_prepare_umount (context_umount.c:413)
==14226==    by 0x4E464F7: mnt_context_umount (context_umount.c:851)
==14226==    by 0x403476: umount_one (umount.c:299)
==14226==    by 0x402B34: main (umount.c:629)

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
10 years agolibmount: use memmove when overlap possible
Dave Reisner [Tue, 17 Sep 2013 21:05:09 +0000 (17:05 -0400)] 
libmount: use memmove when overlap possible

When unmounting some mountpoints as an unprivileged user (via the
'user' option in fstab), the umount fails. Debug output of 'umount
/opt' reveals:

17760: libmount: CXT: [0x22890e0]: do umount
17760: libmount: UTILS: moving to /opt parent
17760: libmount: CXT: current directory moved to / [last_component='opt']
17760: libmount: CXT: [0x22890e0]: umount(2) [target='pt', flags=0x00000000]

valgrind shows the problem:

==23544== Source and destination overlap in memcpy(0x58d1370, 0x58d1371, 4)
==23544==    at 0x4C2BBC3: memcpy@@GLIBC_2.14 (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==23544==    by 0x4E537C3: mnt_chdir_to_parent (utils.c:168)
==23544==    by 0x4E45E4C: mnt_context_do_umount (context_umount.c:601)
==23544==    by 0x4E46513: mnt_context_umount (context_umount.c:855)
==23544==    by 0x403476: umount_one (umount.c:299)
==23544==    by 0x402B34: main (umount.c:629)
==23544==

ref: https://bugs.archlinux.org/task/36968
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
10 years agobash-completion: fix typos in mkfs.bfs logic
Mike Frysinger [Fri, 13 Sep 2013 00:49:04 +0000 (20:49 -0400)] 
bash-completion: fix typos in mkfs.bfs logic

There is no "bfs" command.  Change this file to match the other
mkfs files where we have a "mkfs." prefix.

Reported-by: Michał Górny <mgorny@gentoo.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
10 years agotests: update fdisk outputs
Karel Zak [Thu, 19 Sep 2013 13:04:14 +0000 (15:04 +0200)] 
tests: update fdisk outputs

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agotests: update sun label test
Karel Zak [Thu, 19 Sep 2013 12:17:52 +0000 (14:17 +0200)] 
tests: update sun label test

Note that we use a little different label setting, so the checksums
are also different. For more details see commit
4170ae9cbd3ad54c9c7427212eaae6fdb030b57a.

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agotests: refresh fdisk tests
Karel Zak [Wed, 18 Sep 2013 13:38:33 +0000 (15:38 +0200)] 
tests: refresh fdisk tests

10 years agolibfdisk: fix cylinders and sector buffer usage
Karel Zak [Wed, 18 Sep 2013 12:50:54 +0000 (14:50 +0200)] 
libfdisk: fix cylinders and sector buffer usage

 - sector buffer has to be correctly deallocated
 - round to cylinders when use cylinder units in dos driver

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agolibfdisk: fix sectorbuffer usage in dos driver
Karel Zak [Wed, 18 Sep 2013 10:50:35 +0000 (12:50 +0200)] 
libfdisk: fix sectorbuffer usage in dos driver

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agofdisk: fix 'r' in BSD menu
Karel Zak [Tue, 17 Sep 2013 13:58:09 +0000 (15:58 +0200)] 
fdisk: fix 'r' in BSD menu

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agolibfdisk: update test_ranges() code
Karel Zak [Tue, 17 Sep 2013 13:14:51 +0000 (15:14 +0200)] 
libfdisk: update test_ranges() code

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agofdisk: remove unnecessary test
Karel Zak [Tue, 17 Sep 2013 13:13:15 +0000 (15:13 +0200)] 
fdisk: remove unnecessary test

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agofdisk: bloody revolution in the man page
Karel Zak [Tue, 17 Sep 2013 12:43:30 +0000 (14:43 +0200)] 
fdisk: bloody revolution in the man page

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agolibfdisk: use fdisk_warnx() in fdisk_ask_partnum()
Karel Zak [Tue, 17 Sep 2013 11:17:58 +0000 (13:17 +0200)] 
libfdisk: use fdisk_warnx() in fdisk_ask_partnum()

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agofdisk: separate disks by \n in -l output
Karel Zak [Tue, 17 Sep 2013 10:22:55 +0000 (12:22 +0200)] 
fdisk: separate disks by \n in -l output

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agosfdisk: fix y/n mismatch
Karel Zak [Tue, 17 Sep 2013 07:46:24 +0000 (09:46 +0200)] 
sfdisk: fix y/n mismatch

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agofdisk: add debug message, use colors for -l
Karel Zak [Tue, 17 Sep 2013 07:42:53 +0000 (09:42 +0200)] 
fdisk: add debug message, use colors for -l

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agofdisk: fix -l
Karel Zak [Mon, 16 Sep 2013 15:04:57 +0000 (17:04 +0200)] 
fdisk: fix -l

Signed-off-by: Karel Zak <kzak@redhat.com>