+/*
+ * Copyright (C) 2006-2009 Andre Noll <maan@systemlinux.org>
+ *
+ * Licensed under the GPL v2. For licencing details see COPYING.
+ */
+
#include <unistd.h>
#include <assert.h>
#include <string.h>
int ret;
DIR *dir = opendir(".");
- if (!dir) {
- ret = -ERRNO_TO_DSS_ERROR(errno);
- make_err_msg("opendir(\".\") failed");
- return ret;
- }
+ if (!dir)
+ return -ERRNO_TO_DSS_ERROR(errno);
while ((entry = readdir(dir))) {
mode_t m;
struct stat s;
ret = lstat(entry->d_name, &s) == -1;
if (ret == -1) {
ret = -ERRNO_TO_DSS_ERROR(errno);
- make_err_msg("lstat(\"%s\") failed", entry->d_name);
goto out;
}
m = s.st_mode;
*/
int dss_chdir(const char *path)
{
- int ret = chdir(path);
-
- if (ret >= 0)
+ if (chdir(path) >= 0)
return 1;
- ret = -ERRNO_TO_DSS_ERROR(errno);
- make_err_msg("chdir to %s failed", path);
- return ret;
+ return -ERRNO_TO_DSS_ERROR(errno);
}
/**