Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: Allow specifying custom housekeeping interval #1315

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,12 @@ if test "x$fhs_media" = "xyes"; then
AC_DEFINE([HAVE_FHS_MEDIA], 1, [Define to 1 to use /media for mounting])
fi

housekeeping_interval=10
AC_ARG_WITH([housekeeping_interval],
AS_HELP_STRING([--with-housekeeping-interval=MIN], [Housekeeping interval in minutes [default=10]]),
[housekeeping_interval=$withval], [])
AC_DEFINE_UNQUOTED([HOUSEKEEPING_INTERVAL], [$housekeeping_interval], [Housekeeping interval])

# Libraries
#

Expand Down
2 changes: 1 addition & 1 deletion src/udiskslinuxprovider.c
Original file line number Diff line number Diff line change
Expand Up @@ -795,7 +795,7 @@ udisks_linux_provider_start (UDisksProvider *_provider)
udisks_info ("Initialization complete");

/* schedule housekeeping for every 10 minutes */
provider->housekeeping_timeout = g_timeout_add_seconds (10*60,
provider->housekeeping_timeout = g_timeout_add_seconds (HOUSEKEEPING_INTERVAL * 60,
on_housekeeping_timeout,
provider);
/* ... and also do an initial run */
Expand Down