summaryrefslogtreecommitdiffstats
path: root/libmount/src/fs.c
diff options
context:
space:
mode:
authorOndrej Oprala2013-06-14 13:00:49 +0200
committerKarel Zak2013-07-03 11:21:33 +0200
commitd22f2822ed873bac1dbb28aa5fd5351f3a27b2b8 (patch)
tree2da585531305fbafa471160b3ff5f6a19bead17e /libmount/src/fs.c
parentlibmount: add functions to handle comments in fs tables (diff)
downloadkernel-qcow2-util-linux-d22f2822ed873bac1dbb28aa5fd5351f3a27b2b8.tar.gz
kernel-qcow2-util-linux-d22f2822ed873bac1dbb28aa5fd5351f3a27b2b8.tar.xz
kernel-qcow2-util-linux-d22f2822ed873bac1dbb28aa5fd5351f3a27b2b8.zip
libmount: add functions to safely replace a fs table
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
Diffstat (limited to 'libmount/src/fs.c')
-rw-r--r--libmount/src/fs.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libmount/src/fs.c b/libmount/src/fs.c
index bcf250597..b6b3d12b8 100644
--- a/libmount/src/fs.c
+++ b/libmount/src/fs.c
@@ -1300,6 +1300,10 @@ const char *mnt_fs_get_comment(struct libmnt_fs *fs)
* @fs: fstab entry pointer
* @comm: comment string
*
+ * Note that the comment has to be terminated by '\n' (new line), otherwise
+ * whole filesystem entry will be written as a comment to the tabfile (e.g.
+ * fstab).
+ *
* Returns: 0 on success or <0 in case of error.
*/
int mnt_fs_set_comment(struct libmnt_fs *fs, const char *comm)
@@ -1324,6 +1328,8 @@ int mnt_fs_set_comment(struct libmnt_fs *fs, const char *comm)
* mnt_fs_append_comment:
* @fs: fstab entry pointer
*
+ * See also mnt_fs_set_comment().
+ *
* Returns: 0 on success or <0 in case of error.
*/
int mnt_fs_append_comment(struct libmnt_fs *fs, const char *comm)