summaryrefslogtreecommitdiffstats
path: root/libmount/src/lock.c
Commit message (Collapse)AuthorAgeFilesLines
* libmount: cleanup licenses sections in the filesKarel Zak2018-08-161-3/+8
| | | | | | | | | * add SPDX-License-Identifier (see https://spdx.org/licenses/) * add "This file part of libmount from util-linux project." * use proper text for LGPL-2.1-or-later * use the same texts everywhere Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: Ensure utab.lock mode 644Stanislav Brabec2017-04-181-0/+5
| | | | | | | | | If utab.lock is created by a process with a restricted umask, utab.lock is created with restricted permissions. It breaks userspace monitor. Ensure that the mode is always 644. Signed-off-by: Stanislav Brabec <sbrabec@suse.cz>
* tests: add static keyword where needed [smatch scan]Sami Kerola2017-03-171-1/+1
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* misc: Fix various typosSebastian Rasmussen2016-05-311-2/+2
| | | | | | | Fix various typos in error messages, warnings, debug strings, comments and names of static functions. Signed-off-by: Sebastian Rasmussen <sebras@gmail.com>
* tests: fix compiler warnings [-Wmissing-prototypes]Ruediger Meier2016-02-231-4/+4
| | | | Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* libmount: add note about flock() to docsKarel Zak2015-04-021-0/+4
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: remove assert(arg) from public functionsKarel Zak2015-02-161-1/+2
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: add options map to docsKarel Zak2015-01-261-2/+5
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: fix lock test to use real time to syncKarel Zak2014-11-191-3/+5
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: move all around clock_gettime() to monotonic.cKarel Zak2014-11-191-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* misc: use monotonic time rater than gettimeofdayKarel Zak2014-11-181-4/+5
| | | | | | Based on patch Alexander Samilovskih <alexsamilovskih@gmail.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: use new debug functionsKarel Zak2014-03-211-15/+15
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* include/c.h: prefer nanosleep() over usleep()Karel Zak2014-01-241-2/+2
| | | | | | | | | | | | | | Let's use nanosleep() although if usleep() exists. The nanosleep function does no interact with signals and other timers. The patch introduces xusleep() as replacement to libc (or our fallback) usleep(). Yes, we don't want to use struct timespec + nanosleep() everywhere in code as nano-time resolution is useless for us. The patch also enlarges delays in some busy wait loops. It seems enough to try read/write 4x per second. Signed-off-by: Karel Zak <kzak@redhat.com>
* lib: rename time-util.c to timeutils.c, fix headersKarel Zak2013-09-101-0/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: fix typosOndrej Oprala2013-08-051-15/+15
| | | | Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
* libmount: (test) check writing to a file was successfulSami Kerola2013-04-261-1/+4
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* libmount: fix mount.nfs segfault, rely on assert() rather than on nonnullKarel Zak2013-04-121-0/+2
| | | | | | | | | | | | | | | | | We use mnt_optstr_append_option(&o, mnt_fs_get_vfs_options(fs), NULL); in mount.nfs, unfortunately mnt_optstr_append_option() has been marked ass nonnull(1, 2). That's wrong because append and prepend should robust enough to accept NULL as option name. The patch also removes almost all __attribute__((nonnull). It seems better to rely on assert() to have usable feedback. In many cases (nonnull) is premature optimization for the library. This attribute makes sense for things like strlen() or so... Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=948274 Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: use O_CLOEXECKarel Zak2013-04-031-2/+2
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: clean nonnull attribute usageKarel Zak2012-12-041-3/+0Star
| | | | | | | | | | - use __attribute__((nonnull) for functions where we not able to return an return code ("is", "has" and some "get" functions). - use __attribute__((nonnull) for small functions where we always modify any of the function argument (some mnt_optstr_* functions) Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: use O_CLOEXEC everywhereKarel Zak2012-09-041-2/+2
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: add noreturn function attributeSami Kerola2012-07-261-1/+1
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* libmount: make some string operations more robustKarel Zak2012-06-151-0/+4
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: cleanup docsKarel Zak2012-02-221-2/+2
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: use unsigned int for bitfields [smatch scan]Karel Zak2011-09-121-3/+3
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: fix compiler warnings [-Wunused-parameter -Wsign-compare]Karel Zak2011-08-021-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: remove unnecessary includes, mask API as stableKarel Zak2011-07-251-10/+0Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: cleanup docsKarel Zak2011-07-231-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: use top-level directory for libmount rather than shlibs/mountKarel Zak2011-06-091-0/+703
Signed-off-by: Karel Zak <kzak@redhat.com>