Whamcloud - gitweb
Fix minor typo's in the libblkid.txt documentation file --- thanks to Mike
authorTheodore Ts'o <tytso@mit.edu>
Sat, 8 Jan 2005 03:47:20 +0000 (22:47 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Sat, 8 Jan 2005 03:47:20 +0000 (22:47 -0500)
Castle (dalgoda at ix.netcom.com) for pointing them out --- and clarify
the text describing blkid_put_cache().

doc/ChangeLog
doc/libblkid.txt

index 2cb18d5..aba8a0d 100644 (file)
@@ -1,3 +1,9 @@
+2005-01-07  Theodore Ts'o  <tytso@mit.edu>
+
+       * libblkid.txt: Fix minor typo's --- thanks to Mike Castle
+               (dalgoda at ix.netcom.com) for pointing them out --- and
+               clarify the text describing blkid_put_cache().
+
 2004-12-14  Theodore Ts'o  <tytso@mit.edu>
 
        * Makefile.in (install-doc-libs): Use $(MKINSTALLDIRS) macro
index 8da1203..4aea1b6 100644 (file)
@@ -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 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);