diff options
author | Karel Zak | 2012-01-25 12:56:39 +0100 |
---|---|---|
committer | Karel Zak | 2012-01-25 13:20:37 +0100 |
commit | b82590ad46acf9fe8d332b53875e24c3c31e2482 (patch) | |
tree | 6e2f7e53424393b1925a896a309d2913ae48c136 /libblkid/src/blkidP.h | |
parent | blkid: remove -w option from man page and usage() output (diff) | |
download | kernel-qcow2-util-linux-b82590ad46acf9fe8d332b53875e24c3c31e2482.tar.gz kernel-qcow2-util-linux-b82590ad46acf9fe8d332b53875e24c3c31e2482.tar.xz kernel-qcow2-util-linux-b82590ad46acf9fe8d332b53875e24c3c31e2482.zip |
blkid: move cache to /run on new systems
Why?
* read-only root
* /etc is pretty bad place for caches
* all is usually cached by udev in /dev/disk/by-* and libblkid
is able to use these symlinks
* boot persistent cache is attractive for very small subset of
Linux machines (and they already need extra udev tunning otherwise
udev will probe all block devices during boot)
* the default is possible to override in /etc/blkid.conf
The systems without /run directory will not be affected by this
change.
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libblkid/src/blkidP.h')
-rw-r--r-- | libblkid/src/blkidP.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/libblkid/src/blkidP.h b/libblkid/src/blkidP.h index 00689e827..b6c2bc607 100644 --- a/libblkid/src/blkidP.h +++ b/libblkid/src/blkidP.h @@ -286,9 +286,17 @@ extern char *blkid_strdup(const char *s); extern char *blkid_strndup(const char *s, const int length); extern char *blkid_strconcat(const char *a, const char *b, const char *c); -#define BLKID_CACHE_FILE "/etc/blkid.tab" +/* config file */ #define BLKID_CONFIG_FILE "/etc/blkid.conf" +/* cache file on systemds with /run */ +#define BLKID_RUNTIME_TOPDIR "/run" +#define BLKID_RUNTIME_DIR BLKID_RUNTIME_TOPDIR "/blkid" +#define BLKID_CACHE_FILE BLKID_RUNTIME_DIR "/blkid.tab" + +/* old systems */ +#define BLKID_CACHE_FILE_OLD "/etc/blkid.tab" + #define BLKID_ERR_IO 5 #define BLKID_ERR_PROC 9 #define BLKID_ERR_MEM 12 |