[systemd-commits] 3 commits - m4/attributes.m4 src/shared src/udev
Zbigniew JÄdrzejewski-Szmek
zbyszek at kemper.freedesktop.org
Sat Aug 2 21:28:22 PDT 2014
m4/attributes.m4 | 2 +-
src/shared/missing.h | 10 ++++++++--
src/shared/util.h | 1 +
src/udev/udev-builtin-btrfs.c | 12 ++++--------
4 files changed, 14 insertions(+), 11 deletions(-)
New commits:
commit 7bed7f0e3b1f9596aedb64657e432e5b267adebb
Author: Zbigniew JÄdrzejewski-Szmek <zbyszek at in.waw.pl>
Date: Sun Aug 3 00:27:25 2014 -0400
Move BTRFS_IOC_DEVICES_READY to missing.h
diff --git a/src/shared/missing.h b/src/shared/missing.h
index d54cc1e..e20f9bd 100644
--- a/src/shared/missing.h
+++ b/src/shared/missing.h
@@ -210,7 +210,8 @@ struct btrfs_ioctl_fs_info_args {
#endif
#ifndef BTRFS_IOC_DEFRAG
-#define BTRFS_IOC_DEFRAG _IOW(BTRFS_IOCTL_MAGIC, 2, struct btrfs_ioctl_vol_args)
+#define BTRFS_IOC_DEFRAG _IOW(BTRFS_IOCTL_MAGIC, 2, \
+ struct btrfs_ioctl_vol_args)
#endif
#ifndef BTRFS_IOC_DEV_INFO
@@ -220,7 +221,12 @@ struct btrfs_ioctl_fs_info_args {
#ifndef BTRFS_IOC_FS_INFO
#define BTRFS_IOC_FS_INFO _IOR(BTRFS_IOCTL_MAGIC, 31, \
- struct btrfs_ioctl_fs_info_args)
+ struct btrfs_ioctl_fs_info_args)
+#endif
+
+#ifndef BTRFS_IOC_DEVICES_READY
+#define BTRFS_IOC_DEVICES_READY _IOR(BTRFS_IOCTL_MAGIC, 39, \
+ struct btrfs_ioctl_vol_args)
#endif
#ifndef BTRFS_SUPER_MAGIC
diff --git a/src/udev/udev-builtin-btrfs.c b/src/udev/udev-builtin-btrfs.c
index 49fa165..2e2112f 100644
--- a/src/udev/udev-builtin-btrfs.c
+++ b/src/udev/udev-builtin-btrfs.c
@@ -31,8 +31,6 @@
#include "missing.h"
#include "udev.h"
-#define BTRFS_IOC_DEVICES_READY _IOR(BTRFS_IOCTL_MAGIC, 39, struct btrfs_ioctl_vol_args)
-
static int builtin_btrfs(struct udev_device *dev, int argc, char *argv[], bool test) {
struct btrfs_ioctl_vol_args args;
_cleanup_close_ int fd = -1;
commit dced15575f7bf172e3c9d798c43477539525558c
Author: Simon McVittie <simon.mcvittie at collabora.co.uk>
Date: Fri Aug 1 15:53:07 2014 +0100
util.h: include missing.h, for struct file_handle
This breaks udev-builtin-btrfs.c, which reinvents some of missing.h,
so use missing.h there too.
[zj: removed #include "config.h" and wrapped #include <linux/btrfs.h>
in ifdef HAVE_LINUX_BTRFS_H as discussed on the mailing list.]
diff --git a/src/shared/util.h b/src/shared/util.h
index fd999bd..3e89aaf 100644
--- a/src/shared/util.h
+++ b/src/shared/util.h
@@ -84,6 +84,7 @@
#endif
#include "macro.h"
+#include "missing.h"
#include "time-util.h"
/* What is interpreted as whitespace? */
diff --git a/src/udev/udev-builtin-btrfs.c b/src/udev/udev-builtin-btrfs.c
index 4e80a1d..49fa165 100644
--- a/src/udev/udev-builtin-btrfs.c
+++ b/src/udev/udev-builtin-btrfs.c
@@ -24,15 +24,13 @@
#include <fcntl.h>
#include <errno.h>
#include <sys/ioctl.h>
+#ifdef HAVE_LINUX_BTRFS_H
+#include <linux/btrfs.h>
+#endif
+#include "missing.h"
#include "udev.h"
-#define BTRFS_PATH_NAME_MAX 4087
-struct btrfs_ioctl_vol_args {
- int64_t fd;
- char name[BTRFS_PATH_NAME_MAX + 1];
-};
-#define BTRFS_IOCTL_MAGIC 0x94
#define BTRFS_IOC_DEVICES_READY _IOR(BTRFS_IOCTL_MAGIC, 39, struct btrfs_ioctl_vol_args)
static int builtin_btrfs(struct udev_device *dev, int argc, char *argv[], bool test) {
commit 0943f4b7b22fb676fcd9ede50f8133bf6d4a270b
Author: Zbigniew JÄdrzejewski-Szmek <zbyszek at in.waw.pl>
Date: Sat Aug 2 23:50:22 2014 -0400
build-sys: fix conftest.c to work on arm
All tests for compiler support were failing with:
/usr/bin/ld: /tmp/ccwnVc2A.o: relocation R_ARM_MOVW_ABS_NC against `a' can not be used when making a shared object; recompile with -fPIC
diff --git a/m4/attributes.m4 b/m4/attributes.m4
index aa53ef2..7bd5ad8 100644
--- a/m4/attributes.m4
+++ b/m4/attributes.m4
@@ -42,7 +42,7 @@ AC_DEFUN([CC_CHECK_FLAG_APPEND], [
AS_TR_SH([cc_cv_$2_$3]),
[eval "AS_TR_SH([cc_save_$2])='${$2}'"
eval "AS_TR_SH([$2])='-Werror $3'"
- AC_LINK_IFELSE([AC_LANG_SOURCE([int a = 0; int main(void) { return a; } ])],
+ AC_LINK_IFELSE([AC_LANG_SOURCE([int main(void) { return 0; } ])],
[eval "AS_TR_SH([cc_cv_$2_$3])='yes'"],
[eval "AS_TR_SH([cc_cv_$2_$3])='no'"])
eval "AS_TR_SH([$2])='$cc_save_$2'"])
More information about the systemd-commits
mailing list