X-Git-Url: http://git.tuebingen.mpg.de/?p=dss.git;a=blobdiff_plain;f=file.c;h=cd1e43ef7c32c835266bdd3ae73ac34f614371a0;hp=ea671b1cebbf697931ba1928c63827a2e97410a3;hb=56f81b0dfa62bb5bf2c338733d9370a8b11bfc39;hpb=46cbddf465bd66ba1d5c4bcc780ae0d65abd7f73 diff --git a/file.c b/file.c index ea671b1..cd1e43e 100644 --- a/file.c +++ b/file.c @@ -1,9 +1,6 @@ -/* - * Copyright (C) 2006-2010 Andre Noll - * - * Licensed under the GPL v2. For licencing details see COPYING. - */ +/* SPDX-License-Identifier: GPL-2.0 */ +#include #include #include #include @@ -13,16 +10,16 @@ #include #include - #include "gcc-compat.h" #include "err.h" #include "str.h" +#include "file.h" /** * Call a function for each subdirectory of the current working directory. * * \param dirname The directory to traverse. - * \param func The function to call for each subdirecrtory. + * \param func The function to call for each subdirectory. * \param private_data Pointer to an arbitrary data structure. * * For each top-level directory under \a dirname, the supplied function \a func is @@ -68,19 +65,6 @@ out: closedir(dir); return ret; } -/** - * Wrapper for chdir(2). - * - * \param path The specified directory. - * - * \return Standard. - */ -int dss_chdir(const char *path) -{ - if (chdir(path) >= 0) - return 1; - return -ERRNO_TO_DSS_ERROR(errno); -} /** * Set a file descriptor to non-blocking mode.