In the blkid library, if the BLKID_FILE environment

variable is set, use it to find the blkid.tab file if the
calling application did not supply a filename.
bitmap-optimize
Theodore Ts'o 2004-04-12 07:26:23 -04:00
parent c07f9f2639
commit 7a3a386b9e
2 changed files with 11 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2004-04-12 Theodore Ts'o <tytso@mit.edu>
* cache.c (blkid_get_cache): If the BLKID_FILE environment
variable is set, use it to find the blkid.tab file if the
calling application did not supply a filename.
2004-04-03 Theodore Ts'o <tytso@mit.edu>
* Makefile.in: Update the modtime even if subst doesn't need to

View File

@ -39,7 +39,11 @@ int blkid_get_cache(blkid_cache *ret_cache, const char *filename)
INIT_LIST_HEAD(&cache->bic_devs);
INIT_LIST_HEAD(&cache->bic_tags);
if (!filename || !strlen(filename))
if (filename && !strlen(filename))
filename = 0;
if (!filename)
filename = getenv("BLKID_FILE");
if (!filename)
filename = BLKID_CACHE_FILE;
cache->bic_filename = blkid_strdup(filename);