backport changes to 8.32 patch

This commit is contained in:
Michael Wehr
2022-02-14 21:11:16 +01:00
parent dfb9623dcb
commit f854b119e9

View File

@@ -1,6 +1,6 @@
diff -aur coreutils-8.32/src/copy.c coreutils-8.32-patched/src/copy.c
--- coreutils-8.32/src/copy.c 2020-01-01 15:13:12.000000000 +0100
+++ coreutils-8.32-patched/src/copy.c 2022-02-13 16:14:31.534047672 +0100
+++ coreutils-8.32-patched/src/copy.c 2022-02-14 21:10:42.216002503 +0100
@@ -129,6 +129,133 @@
dev_t dev;
};
@@ -488,7 +488,7 @@ diff -aur coreutils-8.32/src/copy.c coreutils-8.32-patched/src/copy.c
diff -aur coreutils-8.32/src/copy.h coreutils-8.32-patched/src/copy.h
--- coreutils-8.32/src/copy.h 2020-01-01 15:13:12.000000000 +0100
+++ coreutils-8.32-patched/src/copy.h 2022-02-13 16:14:31.538047737 +0100
+++ coreutils-8.32-patched/src/copy.h 2022-02-14 21:10:42.220002638 +0100
@@ -234,6 +234,11 @@
Create destination directories as usual. */
bool symbolic_link;
@@ -526,7 +526,7 @@ diff -aur coreutils-8.32/src/copy.h coreutils-8.32-patched/src/copy.h
#endif
diff -aur coreutils-8.32/src/cp.c coreutils-8.32-patched/src/cp.c
--- coreutils-8.32/src/cp.c 2020-01-01 15:13:12.000000000 +0100
+++ coreutils-8.32-patched/src/cp.c 2022-02-13 16:14:31.538047737 +0100
+++ coreutils-8.32-patched/src/cp.c 2022-02-14 21:10:42.220002638 +0100
@@ -131,6 +131,9 @@
{"symbolic-link", no_argument, NULL, 's'},
{"target-directory", required_argument, NULL, 't'},
@@ -588,7 +588,7 @@ diff -aur coreutils-8.32/src/cp.c coreutils-8.32-patched/src/cp.c
+ FILE *fp ;
+ char output[1024];
+ char fcmd[] = "find";
+ fp = spawn(fcmd, (char *[]){ fcmd, file[0], NULL, "-type", "f", NULL });
+ fp = spawn(fcmd, (char *[]){ fcmd, file[0], "-type", "f", NULL });
+ if ( fp == NULL)
+ printf("failed to run find\r");
+ else
@@ -730,7 +730,7 @@ diff -aur coreutils-8.32/src/cp.c coreutils-8.32-patched/src/cp.c
break;
diff -aur coreutils-8.32/src/mv.c coreutils-8.32-patched/src/mv.c
--- coreutils-8.32/src/mv.c 2020-01-01 15:13:12.000000000 +0100
+++ coreutils-8.32-patched/src/mv.c 2022-02-13 16:14:31.542047802 +0100
+++ coreutils-8.32-patched/src/mv.c 2022-02-14 21:10:42.220002638 +0100
@@ -66,6 +66,9 @@
{"target-directory", required_argument, NULL, 't'},
{"update", no_argument, NULL, 'u'},
@@ -771,7 +771,7 @@ diff -aur coreutils-8.32/src/mv.c coreutils-8.32-patched/src/mv.c
+ FILE *fp ;
+ char output[1024];
+ char fcmd[] = "find";
+ fp = spawn(fcmd, (char *[]){ fcmd, (unsigned char *)(size_t)source, NULL, "-type", "f", NULL });
+ fp = spawn(fcmd, (char *[]){ fcmd, (char *)source, "-type", "f", NULL });
+ if ( fp == NULL)
+ printf("failed to run find\r");
+ else