summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)AuthorFilesLines
2012-06-19blkdev_get_size() on SolarisIgor Pashev1-1/+15
2012-01-22Link with gnulibIgor Pashev2-0/+2
2011-01-31Merge remote branch 'origin/master'LaMont Jones9-27/+224
Conflicts: mount/mount.8 mount/mount.c
2011-01-25cfdisk: data type mismatch, and other, compiler warning fixesSami Kerola1-3/+3
Following warnings will longer appear when one will compile with gcc flags -Wall -Wextra -pedantic cfdisk.c:475:3: warning: comparison of unsigned expression < 0 is always false cfdisk.c:487:16: warning: comparison between signed and unsigned integer expressions cfdisk.c:492:14: warning: comparison between signed and unsigned integer expressions cfdisk.c:565:19: warning: comparison between signed and unsigned integer expressions cfdisk.c:569:19: warning: comparison between signed and unsigned integer expressions cfdisk.c:1070:14: warning: comparison between signed and unsigned integer expressions cfdisk.c:1568:5: warning: missing initializer cfdisk.c:1568:5: warning: (near initialization for 'tmp_ext.volume_label') mbsalign.c:131:2: warning: comparison of unsigned expression >= 0 is always true Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-01-25include: [tt] enlarge output bufferKarel Zak1-4/+21
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-01-17build-sys: use WORDS_BIGENDIAN to determine platform byte-orderFabian Groffen1-6/+1
Autoconf contains the right magic to determine the endianness on many platforms next to Linux. This reverses previous commits to move away from WORDS_BIGENDIAN: "use __BYTE_ORDER rather than AC specific WORDS_BIGENDIAN" This is necessary to compile on non Linux platforms like Darwin and Solaris. Signed-off-by: Fabian Groffen <grobian@gentoo.org>
2011-01-04remove duplicate includesKarel Zak2-5/+0
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-01-04findmnt: add --submounts optionKarel Zak1-0/+8
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-01-03tests: fix strtosize() testKarel Zak2-1/+26
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-01-03lib: [env] consolidate safe_getenv() usageKarel Zak1-1/+35
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-01-03libmount: cleanup mangle() usageKarel Zak1-4/+4
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-01-03libmount: use better format for utab, improve bind mountsKarel Zak1-5/+8
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-01-03libmount: rewrite mountinfo/fstab parsers to use sscanf()Karel Zak1-3/+12
The old solution (without scanf()) was based on old code from mount(8). It seems that the modern libc is able to provide all necessary functionality by sscanf() and %ms directive. Signed-off-by: Karel Zak <kzak@redhat.com>
2011-01-03lib: fix mange() and unmangle() to handle NULLKarel Zak1-0/+9
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-01-03libmount: add unmangle/mangle() functions to APIKarel Zak1-4/+5
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-01-03lib: add wrappers for "at" functionsKarel Zak2-1/+102
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-12-29Merge remote branch 'origin/master'LaMont Jones7-165/+463
Conflicts: login-utils/Makefile.am mount/lomount.c text-utils/od.1
2010-12-16lib: [tt] fix alignment of the last tree childKarel Zak1-1/+1
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-12-09partx: complete rewriteDavidlohr Bueso1-0/+49
Co-Author: Karel Zak <kzak@redhat.com> Signed-off-by: Davidlohr Bueso <dave@gnu.org> Signed-off-by: Karel Zak <kzak@redhat.com>
2010-11-30rename util-linux-ng back to util-linuxKarel Zak1-1/+1
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-11-24lib: [strutils] move strmode() from namei.c to strutils.cKarel Zak1-0/+40
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-11-24lib: [tt] add TT_FL_RIGHT, add columns list parserKarel Zak1-9/+59
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-11-24lib: [ismounted] don't wast time with mtab is /proc/mounts usedKarel Zak1-0/+4
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-11-23lib: [strutils] general purpose string handling functionsDavidlohr Bueso2-37/+74
This patch replaces a few functions used throughout the source: * Renames getnum (from schedutils) to strtol_or_err * Moves strtosize (from lib/strtosize.c) * Moves xstrncpy (from include/xstrncpy.h) * Adds strnlen, strnchr and strndup if not available (remove it from libmount utils) A few Makefile.am files were modified to compile accordingly along with trivial renaming in schedutils source code. Signed-off-by: Davidlohr Bueso <dave@gnu.org>
2010-11-15findmnt: follow HAVE_LANGINFOKarel Zak1-4/+1
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-11-15lib: add fallback for nl_langinfo()Karel Zak1-0/+121
The fallback ignores locales and returns hardcoded static strings. It should be enough to include "nls.h" to work with nl_langinfo() on all systems. Signed-off-by: Karel Zak <kzak@redhat.com>
2010-11-15lib/tt: fix langinfo build breakDavidlohr Bueso1-1/+1
When HAVE_LANGINFO_H is not defined we break the compilation in tt.c: CC tt.o tt.c: In function ‘tt_new_table’: tt.c:142: warning: implicit declaration of function ‘nl_langinfo’ tt.c:142: error: ‘CODESET’ undeclared (first use in this function) tt.c:142: error: (Each undeclared identifier is reported only once tt.c:142: error: for each function it appears in.) make: *** [tt.o] Error 1 Signed-off-by: Davidlohr Bueso <dave@gnu.org>
2010-10-25Merge remote branch 'origin/master'LaMont Jones2-1/+16
2010-10-25lib: add test program to canonicalize.cKarel Zak2-1/+16
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-09-06Merge remote branch 'origin/master'LaMont Jones1-1/+1
Conflicts: mount/lomount.c
2010-08-23lib: fix syntax error in blkdev.cKarel Zak1-1/+1
Reported-by: Tuco <tuco.xyz@gmail.com> Signed-off-by: Karel Zak <kzak@redhat.com>
2010-08-02Merge remote branch 'origin/master'LaMont Jones4-1/+1122
Conflicts: mount/Makefile.am sys-utils/ipcs.c tests/ts/blkid/images-fs/befs.img.bz2 tests/ts/blkid/images-fs/ddf-raid.img.bz2
2010-07-26portability: fix mntent.h and pty.h usageFrançois Revol1-0/+6
Signed-off-by: François Revol <revol@free.fr> Signed-off-by: Karel Zak <kzak@redhat.com>
2010-06-14build-sys: minor changes for GNU/HurdSamuel Thibault2-0/+5
Here is a patch to fix the build on GNU/Hurd. Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
2010-06-03lib: remove unwanted debug messagesKarel Zak1-8/+2
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-06-03lib: tt.c - fix minimal width of columnKarel Zak1-6/+15
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-06-03lib: tt.c: don't print header for empty tableKarel Zak1-1/+1
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-06-03lib: add tt.c (Tree and Table output)Karel Zak2-1/+724
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-06-01taskset: move NR_CPUS determination to lib/cpuset.cKarel Zak1-1/+40
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-06-01lib: add fallback for libc (uClibc) without CPU_ALLOCKarel Zak2-1/+37
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-06-01taskset: use libc based cpu_set_tKarel Zak1-109/+106
The glibc already supports dynamically allocated CPU sets. We don't have to maintains our private non-compatible implementation. Signed-off-by: Karel Zak <kzak@redhat.com>
2010-06-01tests: add cpuset regression testKarel Zak2-1/+72
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-06-01taskset: move bitmap routines to lib/cpuset.cKarel Zak1-0/+241
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-05-14Merge remote branch 'origin/master' into HEADLaMont Jones7-52/+686
Conflicts: lib/fsprobe.c mount/lomount.c
2010-05-07cfdisk: support non-ascii characters in inputKarel Zak1-0/+34
On Sat, Apr 03, 2010 at 12:58:48PM +0000, Jorge wrote: > When you want to write changes to disk you're asked for a > confirmation, like this one: > > Are you sure you want to write the partition table to disk? (yes > or no) > > There is no problem on the English version, but when you launch the > program in Spanish you get this: > > ¿Está seguro de que desea escribir la tabla de particiones en el > disco? > (sí o no): > > You can't type the "í" character. Trying to do so will end in no > input at all. That is, typing in my keyboard "´" then "i" leads to > nothing. So you can't write changes to disk, and you must launch the > program in English for it to operate. Reported-by: Jorge <yo@jorgesuarezdelis.name> Addresses: https://bugs.launchpad.net/ubuntu/+source/util-linux/+bug/205327 Signed-off-by: Karel Zak <kzak@redhat.com>
2010-04-27mount: revert ugly ENOMEDIUM supportKarel Zak1-24/+1
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-03-30lib: add strtosize() functionKarel Zak2-1/+151
This function int strtosize(const char *str, uintmax_t *res) supports {K,M,G,T,E,P}iB and {K,M,G,T,E,P}B suffixes. Signed-off-by: Karel Zak <kzak@redhat.com>
2010-03-16lib: fix blkdev_find_size()Karel Zak1-4/+16
echo l | fdisk/fdisk /dev/zero FYI that however now spins forever doing: offset=3074457345618258603) at ../lib/blkdev.c:31 at ../lib/blkdev.c:151 at ../lib/blkdev.c:161 Reported-by: Pádraig Brady <P@draigBrady.com> Signed-off-by: Karel Zak <kzak@redhat.com>
2010-03-16cal: factor out and update multibyte alignment codePádraig Brady1-0/+254
* include/mbsalign.h: New module interface * lib/mbsalign.c: Updated implementation synced from coreutils * include/Makefile.am: Add mbsalign.h * misc-utils/Makefile.am: Make cal dependent on mbsalign module * misc-utils/cal.c: Call mbsalign() [kzak@redhat.com: - use min() macro from c.h] Signed-off-by: Pádraig Brady <P@draigBrady.com> Signed-off-by: Karel Zak <kzak@redhat.com>
2010-03-16lib: avoid compilation failure on rawhideJim Meyering1-0/+1
* lib/blkdev.c: Include <sys/stat.h>, for use of S_ISREG.