summaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)AuthorFilesLines
2011-01-31Merge remote branch 'origin/master'LaMont Jones12-17/+126
Conflicts: mount/mount.8 mount/mount.c
2011-01-31provide a workaround if program_invocation_short_name is missingFabian Groffen1-0/+36
Try some replacements, such as getexecname() on Solaris and __progname on BSDs and Darwin. When not found, base program_invocation_short_name on the source filename it is used in, as not to require argv[0] to be passed along. This latter approach is not dynamic, but doesn't require code changes for all places where program_invocation_short_name is used now. Signed-off-by: Fabian Groffen <grobian@gentoo.org> Signed-off-by: Karel Zak <kzak@redhat.com>
2011-01-25include: [tt] enlarge output bufferKarel Zak1-0/+1
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-01-23include: emulate dirfd when necessaryFabian Groffen1-0/+9
dirfd is not available on Solaris 10, it is available on latest OpenSolaris releases though. Do some autoconf trickery to determine if providing an alternative dirfd function is necessary and possible. shlibs/blkid/src/read.c: Do not define _XOPEN_SOURCE to 600, or DIR will lose it's dd_fd member again. Rearrange defines and includes to make sense per comments, and not conflict on Solaris. Signed-off-by: Fabian Groffen <grobian@gentoo.org>
2011-01-23lib: [xalloc] don't use hardcoded return codeKarel Zak1-4/+8
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-01-20build-sys: check for paths.hFabian Groffen1-0/+2
paths.h doesn't exist on Solaris Signed-off-by: Fabian Groffen <grobian@gentoo.org>
2011-01-20make _IO macros available on SolarisFabian Groffen1-0/+3
The _IO macro is defined in sys/ioccom.h on various platforms. However, on Solaris it isn't included by ioctl.h, so include it explicitly if available. Signed-off-by: Fabian Groffen <grobian@gentoo.org>
2011-01-20make major and minor available on SolarisKarel Zak1-0/+4
Reported-by: Fabian Groffen <grobian@gentoo.org> Signed-off-by: Karel Zak <kzak@redhat.com>
2011-01-20build-sys: check for loff_t, it may not existFabian Groffen1-0/+4
On some systems, loff_t does not exist. Define it as int64_t in that case. Signed-off-by: Fabian Groffen <grobian@gentoo.org>
2011-01-19build-sys: add rpmatch.h to Makefile.amKarel Zak1-0/+1
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-01-17build-sys: use WORDS_BIGENDIAN to determine platform byte-orderFabian Groffen1-8/+3
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-14include: fix list.h ifdefsKarel Zak1-3/+3
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-01-05include: add fallback for rpmatch()Francesco Cosoleto1-0/+9
Simple replacement code with hardcoded y/n responses to allow compilation on systems without rpmatch() such as Cygwin. Signed-off-by: Francesco Cosoleto <cosoleto@gmail.com> Signed-off-by: Karel Zak <kzak@redhat.com>
2011-01-04lib: [c] add ignore_result()Karel Zak1-0/+2
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-01-04findmnt: add --submounts optionKarel Zak1-0/+2
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-01-03lib: [env] consolidate safe_getenv() usageKarel Zak1-0/+6
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-01-03libmount: cleanup mangle() usageKarel Zak1-1/+1
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-01-03libmount: use better format for utab, improve bind mountsKarel Zak1-1/+1
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-01-03libmount: rewrite mountinfo/fstab parsers to use sscanf()Karel Zak1-0/+5
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-03libmount: add unmangle/mangle() functions to APIKarel Zak1-2/+2
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-01-03libmount: add /etc/fstab.d supportKarel Zak1-0/+2
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-01-03lib: add wrappers for "at" functionsKarel Zak2-0/+24
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-12-29Merge remote branch 'origin/master'LaMont Jones8-20/+122
Conflicts: login-utils/Makefile.am mount/lomount.c text-utils/od.1
2010-12-09partx: complete rewriteDavidlohr Bueso1-0/+1
Co-Author: Karel Zak <kzak@redhat.com> Signed-off-by: Davidlohr Bueso <dave@gnu.org> Signed-off-by: Karel Zak <kzak@redhat.com>
2010-12-01losetup: use /sys/dev/block/.../loop/backing_fileKarel Zak1-0/+1
The basic loopdev attributes are available in sysfs since kernel 2.6.37. This patch uses the backing_file attribute from sysfs for very long filenames (the LOOP_GET_STATUS ioctl uses only 64 bytes for the filename). old version: # losetup -a /dev/loop0: [0804]:12865322 (/home/images/filesystems/this_is_really_really_long_directory_*) new version: # losetup -a /dev/loop0: [0804]:12865322 (/home/images/filesystems/this_is_really_really_long_directory_name/ext2.img) Signed-off-by: Karel Zak <kzak@redhat.com>
2010-11-30build-sys: add missing headerKarel Zak1-1/+2
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-11-24lib: [strutils] move strmode() from namei.c to strutils.cKarel Zak1-0/+4
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-11-24lib: [xalloc] add xstrdup()Karel Zak1-0/+9
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-11-24lib: [tt] add TT_FL_RIGHT, add columns list parserKarel Zak1-2/+6
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-11-23lib: [strutils] general purpose string handling functionsDavidlohr Bueso4-19/+28
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-15lib: add fallback for nl_langinfo()Karel Zak1-0/+73
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-10-25Merge remote branch 'origin/master'LaMont Jones1-0/+46
2010-10-21xalloc: general purpose memory allocation handling wrappersDavidlohr Bueso1-0/+46
[kzak@redhat.com: - use %zu for size_t] Signed-off-by: Davidlohr Bueso <dave@gnu.org> Signed-off-by: Karel Zak <kzak@redhat.com>
2010-10-18Merge remote branch 'origin/master'LaMont Jones1-0/+6
2010-10-15libblkid: fix MBR detection on iPod and cleanup vfat codeKarel Zak1-0/+6
- move all FAT code to superblocks/vfat.c only - add a generic function to verify FAT superblock and use it in FAT prober as well as in MBR parser - add a more robust FAT cluster_count check (it seems that iPod contains an "almost valid" FAT superblock before MBR) Reported-by: Davidlohr Bueso <dave.bueso@gmail.com> Signed-off-by: Karel Zak <kzak@redhat.com>
2010-09-06Merge remote branch 'origin/master'LaMont Jones1-33/+44
Conflicts: mount/lomount.c
2010-08-24include: cleanup blkdev.hKarel Zak1-37/+42
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-08-24blockdev: add BLKDISCARDZEROESKarel Zak1-0/+6
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-08-02Merge remote branch 'origin/master'LaMont Jones6-7/+359
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-06-16lscpu: fix CPU_EQUAL_S macroKarel Zak1-1/+1
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-06-14lscpu: add CPU_EQUAL_S definition for old/obscure libcKarel Zak1-0/+10
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-06-07build-sys: update include/Makefile.amKarel Zak1-7/+8
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-06-03lib: tt.c - fix minimal width of columnKarel Zak1-0/+1
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-06-03lib: add tt.c (Tree and Table output)Karel Zak2-0/+71
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-06-03include: move shlibs/.../list.h to the include/ directoryKarel Zak2-0/+198
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-06-03findmnt: add new commandKarel Zak1-0/+1
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-06-01taskset: move NR_CPUS determination to lib/cpuset.cKarel Zak1-0/+2
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-06-01lib: add fallback for libc (uClibc) without CPU_ALLOCKarel Zak1-0/+45
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-06-01taskset: use libc based cpu_set_tKarel Zak1-14/+9
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-01taskset: move bitmap routines to lib/cpuset.cKarel Zak1-0/+23
Signed-off-by: Karel Zak <kzak@redhat.com>