mirror of
https://github.com/systemd/systemd
synced 2025-10-06 00:13:24 +02:00
basic: Remove assertions from missing_fs.h
These assertions impose an include order between <linux/fs.h> and "missing_fs.h", specifically <linux/fs.h> can't be included before "missing_fs.h". This makes automated include refactoring very painful, so let's get rid of these assertions and instead assume that linux/fs.h does the right thing.
This commit is contained in:
@@ -1,50 +1,8 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
/* temporary undef definitions in bits/uio-ext.h, which is included by sys/uio.h */
|
||||
#include <sys/uio.h>
|
||||
|
||||
#define __RWF_HIPRI_SAVED__ RWF_HIPRI
|
||||
#undef RWF_HIPRI
|
||||
#define __RWF_DSYNC_SAVED__ RWF_DSYNC
|
||||
#undef RWF_DSYNC
|
||||
#define __RWF_SYNC_SAVED__ RWF_SYNC
|
||||
#undef RWF_SYNC
|
||||
#define __RWF_NOWAIT_SAVED__ RWF_NOWAIT
|
||||
#undef RWF_NOWAIT
|
||||
#define __RWF_APPEND_SAVED__ RWF_APPEND
|
||||
#undef RWF_APPEND
|
||||
#define __RWF_NOAPPEND_SAVED__ RWF_NOAPPEND
|
||||
#undef RWF_NOAPPEND
|
||||
#if defined(RWF_ATOMIC)
|
||||
#define __RWF_ATOMIC_SAVED__ RWF_ATOMIC
|
||||
#undef RWF_ATOMIC
|
||||
#else
|
||||
#define __RWF_ATOMIC_SAVED__ 0x00000040
|
||||
#endif
|
||||
#if defined(RWF_DONTCACHE)
|
||||
#define __RWF_DONTCACHE_SAVED__ RWF_DONTCACHE
|
||||
#undef RWF_DONTCACHE
|
||||
#else
|
||||
#define __RWF_DONTCACHE_SAVED__ 0x00000080
|
||||
#endif
|
||||
|
||||
#include <linux/btrfs.h>
|
||||
#include <linux/btrfs_tree.h>
|
||||
#include <linux/fs.h>
|
||||
|
||||
#include "macro.h"
|
||||
|
||||
/* check RWF_xyz are redefined by linux/fs.h */
|
||||
assert_cc(RWF_HIPRI == __RWF_HIPRI_SAVED__);
|
||||
assert_cc(RWF_DSYNC == __RWF_DSYNC_SAVED__);
|
||||
assert_cc(RWF_SYNC == __RWF_SYNC_SAVED__);
|
||||
assert_cc(RWF_NOWAIT == __RWF_NOWAIT_SAVED__);
|
||||
assert_cc(RWF_APPEND == __RWF_APPEND_SAVED__);
|
||||
assert_cc(RWF_NOAPPEND == __RWF_NOAPPEND_SAVED__);
|
||||
assert_cc(RWF_ATOMIC == __RWF_ATOMIC_SAVED__);
|
||||
assert_cc(RWF_DONTCACHE == __RWF_DONTCACHE_SAVED__);
|
||||
|
||||
/* Not exposed yet. Defined at fs/ext4/ext4.h */
|
||||
#ifndef EXT4_IOC_RESIZE_FS
|
||||
#define EXT4_IOC_RESIZE_FS _IOW('f', 16, __u64)
|
||||
|
@@ -3,6 +3,8 @@
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <inttypes.h>
|
||||
#include <linux/btrfs.h>
|
||||
#include <linux/btrfs_tree.h>
|
||||
#include <linux/loop.h>
|
||||
#include <linux/magic.h>
|
||||
#include <stddef.h>
|
||||
|
@@ -2,6 +2,7 @@
|
||||
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <linux/btrfs.h>
|
||||
#include <stddef.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
@@ -1,5 +1,6 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
|
||||
#include <linux/btrfs.h>
|
||||
#include <linux/magic.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/vfs.h>
|
||||
|
@@ -1,6 +1,7 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <linux/btrfs.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/ioctl.h>
|
||||
|
||||
|
Reference in New Issue
Block a user