aboutsummaryrefslogtreecommitdiffstats
path: root/file_cmds/mtree
diff options
context:
space:
mode:
authorCameron Katri <me@cameronkatri.com>2021-05-10 09:13:28 -0400
committerCameron Katri <me@cameronkatri.com>2021-05-10 09:13:28 -0400
commitad3d9102dbec58bdd72fffe933081e8d258e962d (patch)
tree32f91557fb89a7ca44116a828cf25b64e95925fd /file_cmds/mtree
parentf6684a2134ecc4959011955e89abb6103dd2eb2f (diff)
downloadapple_cmds-ad3d9102dbec58bdd72fffe933081e8d258e962d.tar.gz
apple_cmds-ad3d9102dbec58bdd72fffe933081e8d258e962d.tar.zst
apple_cmds-ad3d9102dbec58bdd72fffe933081e8d258e962d.zip
file_cmds: mtree probably won't work, but it does compile
Diffstat (limited to 'file_cmds/mtree')
-rw-r--r--file_cmds/mtree/Makefile19
-rw-r--r--file_cmds/mtree/commoncrypto.c4
2 files changed, 22 insertions, 1 deletions
diff --git a/file_cmds/mtree/Makefile b/file_cmds/mtree/Makefile
new file mode 100644
index 0000000..aedc899
--- /dev/null
+++ b/file_cmds/mtree/Makefile
@@ -0,0 +1,19 @@
+PROG= mtree
+MAN= mtree.8
+SRCS= commoncrypto.c \
+ compare.c \
+ create.c \
+ excludes.c \
+ metrics.c \
+ misc.c \
+ mtree.c \
+ spec.c \
+ specspec.c \
+ verify.c \
+ crc.c
+
+.PATH: ../cksum
+
+LDADD=-framework CoreFoundation
+
+.include <bsd.prog.mk>
diff --git a/file_cmds/mtree/commoncrypto.c b/file_cmds/mtree/commoncrypto.c
index 11e97ce..36cfcb8 100644
--- a/file_cmds/mtree/commoncrypto.c
+++ b/file_cmds/mtree/commoncrypto.c
@@ -12,7 +12,7 @@
#include <unistd.h>
#include <sys/xattr.h>
#include <sys/mount.h>
-#include <apfs/apfs_fsctl.h>
+//#include <apfs/apfs_fsctl.h>
#include "commoncrypto.h"
#include "extern.h"
@@ -255,6 +255,7 @@ get_xdstream_privateid(char *path, char *buf) {
nextName += strlen(name) + 1;
}
+#ifdef APFSIOC_XDSTREAM_OBJ_ID
for (int i = 0; i < xattrIndex; i++) {
char *name = xattrs[i];
// System volume has stream based xattrs only in form of resource forks
@@ -276,6 +277,7 @@ get_xdstream_privateid(char *path, char *buf) {
}
}
}
+#endif
ai->xdstream_priv_id = xd_obj_id;
// insert a dummy value as digest is not used in presence of mflag