chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Prep v231.2: basic/stdio-util.h must include parse-printf-format.h instead of printf.h
[elogind.git]
/
src
/
basic
/
stat-util.c
diff --git
a/src/basic/stat-util.c
b/src/basic/stat-util.c
index baa3b5c822f49df5ededea7ab3d8af099fb18029..81c13ec59436c64c0a0c345361785a0144fffea2 100644
(file)
--- a/
src/basic/stat-util.c
+++ b/
src/basic/stat-util.c
@@
-1,5
+1,3
@@
-/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-
/***
This file is part of systemd.
/***
This file is part of systemd.
@@
-19,7
+17,11
@@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
+#include <dirent.h>
+#include <errno.h>
#include <fcntl.h>
#include <fcntl.h>
+#include <sys/stat.h>
+#include <sys/types.h>
#include <linux/magic.h>
#include <sys/statvfs.h>
#include <unistd.h>
#include <linux/magic.h>
#include <sys/statvfs.h>
#include <unistd.h>
@@
-31,8
+33,7
@@
#include "stat-util.h"
#include "string-util.h"
#include "stat-util.h"
#include "string-util.h"
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
int is_symlink(const char *path) {
struct stat info;
int is_symlink(const char *path) {
struct stat info;
@@
-61,8
+62,7
@@
int is_dir(const char* path, bool follow) {
return !!S_ISDIR(st.st_mode);
}
return !!S_ISDIR(st.st_mode);
}
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
int is_device_node(const char *path) {
struct stat info;
int is_device_node(const char *path) {
struct stat info;
@@
-115,8
+115,7
@@
int null_or_empty_path(const char *fn) {
return null_or_empty(&st);
}
return null_or_empty(&st);
}
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
int null_or_empty_fd(int fd) {
struct stat st;
int null_or_empty_fd(int fd) {
struct stat st;
@@
-149,8
+148,7
@@
int path_is_read_only_fs(const char *path) {
return false;
}
return false;
}
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
int path_is_os_tree(const char *path) {
char *p;
int r;
int path_is_os_tree(const char *path) {
char *p;
int r;
@@
-194,8
+192,7
@@
bool is_fs_type(const struct statfs *s, statfs_f_type_t magic_value) {
return F_TYPE_EQUAL(s->f_type, magic_value);
}
return F_TYPE_EQUAL(s->f_type, magic_value);
}
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
int fd_check_fstype(int fd, statfs_f_type_t magic_value) {
struct statfs s;
int fd_check_fstype(int fd, statfs_f_type_t magic_value) {
struct statfs s;