diff options
| author | manuel <manuel@mausz.at> | 2013-02-04 00:08:53 +0100 |
|---|---|---|
| committer | manuel <manuel@mausz.at> | 2013-02-04 00:08:53 +0100 |
| commit | 69aec538b456402170dc723af417ba5c05389c32 (patch) | |
| tree | e6f34c543f17c6392447ea337b2e2868212424d1 /fd_move.c | |
| download | qmail-69aec538b456402170dc723af417ba5c05389c32.tar.gz qmail-69aec538b456402170dc723af417ba5c05389c32.tar.bz2 qmail-69aec538b456402170dc723af417ba5c05389c32.zip | |
qmail 1.03 import
Diffstat (limited to 'fd_move.c')
| -rw-r--r-- | fd_move.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/fd_move.c b/fd_move.c new file mode 100644 index 0000000..1aa557f --- /dev/null +++ b/fd_move.c | |||
| @@ -0,0 +1,11 @@ | |||
| 1 | #include "fd.h" | ||
| 2 | |||
| 3 | int fd_move(to,from) | ||
| 4 | int to; | ||
| 5 | int from; | ||
| 6 | { | ||
| 7 | if (to == from) return 0; | ||
| 8 | if (fd_copy(to,from) == -1) return -1; | ||
| 9 | close(from); | ||
| 10 | return 0; | ||
| 11 | } | ||
