]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
libmount: add options map to docs
authorKarel Zak <kzak@redhat.com>
Mon, 26 Jan 2015 11:25:40 +0000 (12:25 +0100)
committerKarel Zak <kzak@redhat.com>
Mon, 26 Jan 2015 11:25:40 +0000 (12:25 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
libmount/docs/libmount-sections.txt
libmount/src/libmount.h.in
libmount/src/lock.c

index 38013042fc6f1598edf43280f263db2098f6c4d0..1fd509de810f03d2ecc740fa1196a9cc0bb2d24b 100644 (file)
@@ -263,6 +263,7 @@ mnt_lock_block_signals
 
 <SECTION>
 <FILE>optmap</FILE>
+libmnt_optmap
 mnt_get_builtin_optmap
 MNT_INVERT
 MNT_NOMTAB
index a45e0fad7e595ed415055f59a5ecabfb08c2f21f..30dc06b6988bd1f2a9b0e6a0c361fb72838392a6 100644 (file)
@@ -57,14 +57,17 @@ struct libmnt_iter;
 
 /**
  * libmnt_optmap:
+ * @name: option name[=type] where type is printf-like type specifier")
+ * @id: option ID or MS_* flags (e.g MS_RDONLY)
+ * @mask: MNT_{NOMTAB,INVERT,...} mask
  *
  * Mount options description (map)
  */
 struct libmnt_optmap
 {
-       const char      *name;   /* option name[=%<type>] (e.g. "loop[=%s]") */
-       int             id;      /* option ID or MS_* flags (e.g MS_RDONLY) */
-       int             mask;    /* MNT_{NOMTAB,INVERT,...} mask */
+       const char      *name;
+       int             id;
+       int             mask;
 };
 
 /*
index 49aeae9aa36205a96365d8197f5f648497d24002..713b3e653ad885ccd8663be4737f18751bef6edf 100644 (file)
@@ -260,8 +260,11 @@ static int mnt_wait_mtab_lock(struct libmnt_lock *ml, struct flock *fl, time_t m
        int ret = 0;
 
        gettime_monotonic(&now);
-       DBG(LOCKS, ul_debugobj(ml, "(%d) waiting for F_SETLKW (now=%ju, maxtime=%ju, diff=%ju)",
-                               getpid(), now.tv_sec, maxtime, maxtime - now.tv_sec));
+       DBG(LOCKS, ul_debugobj(ml, "(%d) waiting for F_SETLKW (now=%lu, maxtime=%lu, diff=%lu)",
+                               getpid(),
+                               (unsigned long) now.tv_sec,
+                               (unsigned long) maxtime,
+                               (unsigned long) (maxtime - now.tv_sec)));
 
        if (now.tv_sec >= maxtime)
                return 1;               /* timeout */