summaryrefslogtreecommitdiff
path: root/doc/libblkid.txt
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2005-01-07 22:47:20 -0500
committerTheodore Ts'o <tytso@mit.edu>2005-01-07 22:47:20 -0500
commitc840731ea57daa60ea6a59da9610508514326b89 (patch)
treeb415acf3a341037132e1247463d2ddad97a534f5 /doc/libblkid.txt
parentde628f7c56b73ab20fb41485752b41d0f2a065c5 (diff)
downloade2fsprogs-c840731ea57daa60ea6a59da9610508514326b89.tar.gz
Fix minor typo's in the libblkid.txt documentation file --- thanks to Mike
Castle (dalgoda at ix.netcom.com) for pointing them out --- and clarify the text describing blkid_put_cache().
Diffstat (limited to 'doc/libblkid.txt')
-rw-r--r--doc/libblkid.txt21
1 files changed, 10 insertions, 11 deletions
diff --git a/doc/libblkid.txt b/doc/libblkid.txt
index 8da12039..4aea1b6c 100644
--- a/doc/libblkid.txt
+++ b/doc/libblkid.txt
@@ -35,7 +35,7 @@ simply call the blkid_get_devname() function:
}
The cache parameter is optional; if it is NULL, then the blkid library
-will load the default blkid.tab cache file, and the release the cache
+will load the default blkid.tab cache file, and then release the cache
before function call returns. The return value is an allocated string
which holds the resulting device name (if it is found). If the value
is NULL, then attribute_name is parsed as if it were
@@ -49,17 +49,17 @@ Alternatively, of course, the programmer can pass an attribute name of
"LABEL", and value of "root", if that is more convenient.
Another common usage is to retrieve the value of a specific attribute
-for a particular device. This can be used to used to determine the
-filesystem type, or label, or uuid for a particular device:
+for a particular device. This can be used to determine the filesystem
+type, or label, or uuid for a particular device:
if ((value = blkid_get_tag_value(cache, attribute_name, devname))) {
/* do something with value */
string_free(value);
}
-If a program need to call multiple blkid functions, then passing in a
+If a program needs to call multiple blkid functions, then passing in a
cache value of NULL is not recommended, since the /etc/blkid.tab file
-will be repeatedly parsed over and over again, with a memory allocated
+will be repeatedly parsed over and over again, with memory allocated
and deallocated. To initialize the blkid cache, blkid_get_cache()
function is used:
@@ -70,10 +70,9 @@ The second parameter of blkid_get_cache (if non-zero) is the alternate
filename of the blkid cache file (where the default is
/etc/blkid.tab). Normally, programs should just pass in NULL.
-If you have called blkid_get_cache(), you need to clean up by saving
-the cache (assuming you have write access to the cache, this happens
-automatically if you didn't load it directly), and freeing it (this
-will also free all associated devices/tags):
-
- blkid_put_cache(cache);
+If you have called blkid_get_cache(), you should call blkid_put_cache()
+when you are done using the blkid library functions. This will save the
+cache to the blkid.tab file, if you have write access to the file. It
+will also free all associated devices and tags:
+ blkid_put_cache(cache);