summaryrefslogtreecommitdiffstats
path: root/include/canonicalize.h
Commit message (Collapse)AuthorAgeFilesLines
* lsblk: use prefix for DM nameKarel Zak2018-06-211-0/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: try absolute target before canonicalizeKarel Zak2016-04-131-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The path canonicalization is expensive and in many cases unwanted due to problems with readlink() on unreachable NFS and automounters. This patch add a possibility to search also by $(CWD)/<path> if the <path> is relative to reduce number of situation when we convert the path to the canonical absolute path. The common use-case: # cd /some/long/path # umount ./mountpoint old version: 15543: libmount: TAB: [0x560a99a54230]: lookup TARGET: './test' 15543: libmount: CACHE: [0x560a99a54290]: canonicalize path ./test 15543: libmount: CACHE: [0x560a99a54290]: add entry [ 1] (path): /mnt/test: ./test 15543: libmount: TAB: [0x560a99a54230]: lookup canonical TARGET: '/mnt/test' 15543: libmount: CXT: [0x560a99a54050]: umount fs: /mnt/test new version: 15597: libmount: TAB: [0xabf230]: lookup TARGET: './test' 15597: libmount: TAB: [0xabf230]: lookup absolute TARGET: '/mnt/test' 15597: libmount: CXT: [0xabf050]: umount fs: /mnt/test Signed-off-by: Karel Zak <kzak@redhat.com>
* include: cleanup copyright headersKarel Zak2013-01-081-0/+11
| | | | | | | 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>
* lib/canonicalize: add canonicalize_path_restricted() to canonicalize without ↵Karel Zak2012-11-261-0/+1
| | | | | | suid permisssions Signed-off-by: Karel Zak <kzak@redhat.com>
* mount: and libblkid: covert /dev/dm-N to /dev/mapper/<name>Karel Zak2009-10-261-0/+1
| | | | | | | | | | | | | * mount(8) uses private device-mapper names in mtab * libblkid returns private device-mapper names when evaluate udev /dev/disk-by symlinks. * on systems where DM is fully integrated with udev the /dev/mapper/<name> files are symlinks to /dev/dm-N. It means we need a special care to hide private device-mapper names. Signed-off-by: Karel Zak <kzak@redhat.com>
* include: use c.h in canonicalize.hKarel Zak2009-10-161-4/+1Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* mount: move realpath.c code to lib/Karel Zak2009-02-111-0/+11
Signed-off-by: Karel Zak <kzak@redhat.com>