Skip to content

Commit

Permalink
libmount: add options map to docs
Browse files Browse the repository at this point in the history
Signed-off-by: Karel Zak <kzak@redhat.com>
  • Loading branch information
karelzak committed Jan 26, 2015
1 parent c580b55 commit 3df1a79
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
1 change: 1 addition & 0 deletions libmount/docs/libmount-sections.txt
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,7 @@ mnt_lock_block_signals

<SECTION>
<FILE>optmap</FILE>
libmnt_optmap
mnt_get_builtin_optmap
MNT_INVERT
MNT_NOMTAB
Expand Down
9 changes: 6 additions & 3 deletions libmount/src/libmount.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};

/*
Expand Down
7 changes: 5 additions & 2 deletions libmount/src/lock.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit 3df1a79

Please sign in to comment.