Fix rm-hooks in case no post-remove hook was specified.
[dss.git] / fd.h
1 /*
2  * Copyright (C) 2006-2008 Andre Noll <maan@systemlinux.org>
3  *
4  * Licensed under the GPL v2. For licencing details see COPYING.
5  */
6 int dss_chdir(const char *path);
7 int for_each_subdir(int (*func)(const char *, void *), void *private_data);
8 __must_check int mark_fd_nonblocking(int fd);
9 /**
10  * A wrapper for rename(2).
11  *
12  * \param old_path The source path.
13  * \param new_path The destination path.
14  *
15  * \return Standard.
16  *
17  * \sa rename(2).
18  */
19 _static_inline_ int dss_rename(const char *old_path, const char *new_path)
20 {
21         if (rename(old_path, new_path) >= 0)
22                 return 1;
23         return -ERRNO_TO_DSS_ERROR(errno);
24 }
25
26 int dss_select(int n, fd_set *readfds, fd_set *writefds,
27                 struct timeval *timeout_tv);