File: file_attr.h

package info (click to toggle)
xfsprogs 6.17.0-2
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 11,324 kB
  • sloc: ansic: 167,334; sh: 4,604; makefile: 1,336; python: 835; cpp: 5
file content (30 lines) | stat: -rw-r--r-- 643 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// SPDX-License-Identifier: GPL-2.0
/*
 * Copyright (c) 2025 Red Hat, Inc.
 * All Rights Reserved.
 */
#ifndef __LIBFROG_FILE_ATTR_H__
#define __LIBFROG_FILE_ATTR_H__

#include "linux.h"
#include <sys/stat.h>

#define SPECIAL_FILE(x) \
	   (S_ISCHR((x)) \
	|| S_ISBLK((x)) \
	|| S_ISFIFO((x)) \
	|| S_ISLNK((x)) \
	|| S_ISSOCK((x)))

int
xfrog_file_getattr(
	const int		dfd,
	const char		*path,
	const struct stat	*stat,
	struct file_attr	*fa,
	const unsigned int	at_flags);

int xfrog_file_setattr(const int dfd, const char *path, const mode_t mode,
		struct file_attr *fa, const unsigned int at_flags);

#endif /* __LIBFROG_FILE_ATTR_H__ */