summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* libmount: add mnt_fs_get_propagation()Karel Zak2013-01-104-0/+39
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* findmnt: add ID columnKarel Zak2013-01-101-0/+8
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* findmnt: add OPT-FIELDS columnKarel Zak2013-01-101-0/+5
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: read optional mountinfo fieldsOndrej Oprala2013-01-106-0/+26
| | | | | | | | | | [kzak@redhat.com: - rename struct member and functions from "propagation" to "optional fields" - split the original patch - fix parser] Signed-off-by: Ondrej Oprala <ondrej.oprala@gmail.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: fix regression test helperOndrej Oprala2013-01-101-2/+2
| | | | | Signed-off-by: Ondrej Oprala <ondrej.oprala@gmail.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* libblkid: make btrfs magics more readableKarel Zak2013-01-101-10/+4Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: cleanup --enable-most-builds listSami Kerola2013-01-101-3/+5
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* build-sys: ignore chkdupexeSami Kerola2013-01-101-0/+1
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* build-sys: add files to distributionSami Kerola2013-01-102-3/+5
| | | | | | | To fix 'make distcheck' compilation. The fdisks/Makemodule.am has one new entry 'dos_part_types.h', the rest is about sorting the list. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* libblkid: add support for btrfs backup superblockGoffredo Baroncelli2013-01-101-0/+8
| | | | | | | | | | | | | | | | | | Btrfs has three superblock. The first one is placed at 64KB, the second one at 64MB, the third one at 256GB. If the first superblock is valid except that the "magic field" is zeroed, btrfs skips the check of the other superblocks. If the first superblock is fully invalid, btrfs checks for the other superblock. So zeroing the first superblock "magic field" at the beginning seems that the filesystem is wiped. But when the first superblock is overwritten (eg by another filesystem), then the other two superblock may be considered valid, and the filesystem may resurrect. This patch allow to find and wipe the other btrfs superblocks signature. Signed-off-by: Karel Zak <kzak@redhat.com>
* hexdump: do not segfault when iterating over an empty format stringOndrej Oprala2013-01-104-7/+37
| | | | Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
* mount: add support for x-mount.mkdir[=<mode>] optionOndrej Oprala2013-01-095-2/+70
| | | | | | | | | If the target directory (mountpoint) does not exist then mount(8) will create it before mount.<type> is executed or mount(2) syscall is called. Co-Author: Karel Zak <kzak@redhat.com> Signed-off-by: Ondrej Oprala <ooprala@redhat.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount; add recursive mkdirKarel Zak2013-01-092-0/+54
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* mount: document x-* optionsKarel Zak2013-01-091-0/+7
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* mount: Fix -t in listing mode when run as non-rootRichard Tollerton2013-01-091-1/+6
| | | | | | | | | | | Presently, libmount-mount completely prohibits the use of -t by non-root users. This breaks using -t in listing mode as a user, which represents a regression against mount-deprecated, macosx and presumably *BSD. This commit fixes the issue by deferring the mnt_context_is_restricted check for -t until we know we're not in listing mode. Signed-off-by: Rich Tollerton <rich.tollerton@ni.com>
* mkfs.minix: fix compiler warning [-Wformat]Karel Zak2013-01-091-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libblkid: add missing promise raid metadata locationsPhillip Susi2013-01-091-1/+1
| | | | | There are some additional locations where dmraid can find and use pdc raid metadata that libblkid was not checking.
* mount: document options for debugfsDave Reisner2013-01-091-2/+7
| | | | | | Since 3.4, debugfs allows uid, gid, and mode options. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
* build-sys: invert flag for sulogin emergency mountDave Reisner2013-01-091-3/+3
| | | | | | This should be disabled by default. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
* losetup: fix declarations [smatch scan]Sami Kerola2013-01-091-2/+5
| | | | | | | sys-utils/losetup.c:309:2: error: 'for' loop initial declarations are only allowed in C99 mode sys-utils/losetup.c:374:2: error: 'for' loop initial declarations are only allowed in C99 mode Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* swapon: default to --show if nothing is requestedSami Kerola2013-01-091-4/+1Star
| | | | | | Proposed-by: Karel Zak <kzak@redhat.com> References: http://www.spinics.net/lists/util-linux-ng/msg07301.html Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* ipcs: fix spacing in summary outputSami Kerola2013-01-091-1/+1
| | | | | | Change 56692a6 introduced spacing error to --summary printing. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* script: search shell from path, when necessarySami Kerola2013-01-091-5/+11
| | | | | Addresses: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=518532 Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* flock: improve usage stringsMike Frysinger2013-01-092-5/+16
| | | | | | | | The current examples miss the best usage of all: specifying the command and its arguments directly on the command line. Add that to both the program usage and the man page. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* include/ttyutils: add default chardataWerner Fink2013-01-085-37/+28Star
| | | | | | | | | | | | this one moves the init_chardata to include/ttyutils.h as well as to lib/include/ttyutils.c. Also the macros CTL/CTRL are fixed in agetty.c and sulogin.c to use the XOR variant CTL. [kzak@redhat.com: use macro rather than global variable for default chardata] Signed-off-by: Werner Fink <werner@suse.de> Signed-off-by: Karel Zak <kzak@redhat.com>
* include: cleanup copyright headersKarel Zak2013-01-0816-8/+88
| | | | | | | We use the code from include/ and lib/ on many places, so use public domain if possible or LGPL for code copied from libs. Signed-off-by: Karel Zak <kzak@redhat.com>
* include/bitopts: Use the operating system byteswapping functionsKarel Zak2013-01-082-63/+100
| | | | | | | The swap macros are already in libc. Co-Author: Cristian Rodríguez <crrodriguez@opensuse.org> Signed-off-by: Karel Zak <kzak@redhat.com>
* swapon: print warning about insecure owner/permissionsKarel Zak2013-01-081-10/+6Star
| | | | | | | | | Let's make it more obvious if swap area is accessible for non-root users. The old version prints the warning only if --verbose is specified. Reported-by: mp.lists@free.fr Signed-off-by: Karel Zak <kzak@redhat.com>
* lsblk: Add write-same attribute to topology infoMilan Broz2013-01-072-2/+17
| | | | | Signed-off-by: Milan Broz <mbroz@redhat.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* unshare: support the switching of namespacesNeil Horman2013-01-073-29/+83
| | | | | | | | | | | | | | | | | | | | | In addition to the unshare syscall, there exists the setns syscall, which allows processes to migrate to the namepsaces of other processes. Add this functionality into the unshare command, as they operate in a fairly simmilar fashion. Note: There was discussion of adding a path based namespace argument to unshare in the origional discussion thread, but I opted to leave that out as it didn't seem to fit in nicely with the current argument pattern. I figure we can always add that in later if we need to [kzak@redhat.com: - fix optional arguments - do not call unshare if no flag specified - use O_CLOEXEC - codding style cleanup] Signed-off-by: Neil Horman <nhorman@tuxdriver.com> CC: Karel Zak <kzak@redhat.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* agetty: replace perms 660 to 620Karel Zak2013-01-022-2/+5
| | | | | | ... the default is root:tty 620 Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: remove consoles.hKarel Zak2012-12-271-1/+0Star
| | | | | Reported-by: Bernhard Voelker <mail@bernhard-voelker.de> Signed-off-by: Karel Zak <kzak@redhat.com>
* sulogin: don't use {de,con}structor attributesKarel Zak2012-12-233-2/+17
| | | | | | | We're not Russian roulette players, so don't use such ugly things at all.. Reported-by: Dave Reisner <d@falconindy.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* sulogin: remove consoles.c from libcommonKarel Zak2012-12-237-29/+26Star
| | | | | | | | - move struct chardata to include/ttyutils.h - move console.{h,c} to login-utils/sulogin-* (it's sulogin specific) - fix sulogin and agetty includes Signed-off-by: Karel Zak <kzak@redhat.com>
* mkfs.minix: fsck:minix: fix compiler warningsKarel Zak2012-12-202-6/+6
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* mkswap: fix compiler warningsKarel Zak2012-12-201-1/+7
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* lslocks: fix compiler warningsKarel Zak2012-12-201-3/+3
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* fdisk: (gpt) fix compiler warningsKarel Zak2012-12-201-12/+14
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* setterm: fix compiler warningKarel Zak2012-12-201-1/+3
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* ipcs: fix compiler warnings, use 64bit timeKarel Zak2012-12-203-31/+36
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* hwclock: fix compiler warningKarel Zak2012-12-201-1/+0Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* ipcs: make --human really sexyKarel Zak2012-12-191-2/+12
| | | | | | Align the "size" columns to the right. Signed-off-by: Karel Zak <kzak@redhat.com>
* lib/ismounted: improve loopdev supportKarel Zak2012-12-191-18/+9Star
| | | | | | | ... to make it usable for situations when the same backing file is mapped to more loop devices. Signed-off-by: Karel Zak <kzak@redhat.com>
* libblkid: improve test_blkid_devno, fix compiler warning [-Wunused-result]Karel Zak2012-12-191-1/+3
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* lib/ismounted: basic support for loop devicesKarel Zak2012-12-193-12/+36
| | | | | | | | | | | | | | | | | | | | | | # losetup -a /dev/loop0 /dev/loop0: [2053]:1048578 (/home/fs-images/filesystems/ext2.img) # findmnt /dev/loop0 TARGET SOURCE FSTYPE OPTIONS /mnt/test /dev/loop0 ext3 rw,relatime,data=ordered old version: ./test_ismounted /home/fs-images/filesystems/ext2.img not mounted new version: ./test_ismounted /home/fs-images/filesystems/ext2.img mounted on /mnt/test Reported-by: Sami Kerola <kerolasa@iki.fi> Signed-off-by: Karel Zak <kzak@redhat.com>
* lib/loopdev: fix loopdev_find_by_backing_file()Karel Zak2012-12-191-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* docs: add missing exit value to fsck.minix(8)Sami Kerola2012-12-191-4/+2Star
| | | | | | | And remove references to manual pages which has not been part of commonly used distributions for a while. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* minix: replace magic constants with macro namesSami Kerola2012-12-192-9/+9
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* minix: use off_t, size_t, etc appropriate typesSami Kerola2012-12-192-10/+10
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* minix: change types in header fileSami Kerola2012-12-191-20/+20
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>