diff options
3 files changed, 180 insertions, 34 deletions
diff --git a/meta-oe/recipes-kernel/trace-cmd/files/0001-Replace-LFS64-interfaces-off64_t-and-lseek64.patch b/meta-oe/recipes-kernel/trace-cmd/files/0001-Replace-LFS64-interfaces-off64_t-and-lseek64.patch index 830f1d96e1..1e5415ef6a 100644 --- a/meta-oe/recipes-kernel/trace-cmd/files/0001-Replace-LFS64-interfaces-off64_t-and-lseek64.patch +++ b/meta-oe/recipes-kernel/trace-cmd/files/0001-Replace-LFS64-interfaces-off64_t-and-lseek64.patch | |||
@@ -1,18 +1,18 @@ | |||
1 | From c6190920d405a5a6df3797153be93905d98a65f5 Mon Sep 17 00:00:00 2001 | 1 | From 9c3213a3b64e049c1aa065300b01ee751699b01f Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
3 | Date: Fri, 6 Jan 2023 16:53:06 -0800 | 3 | Date: Fri, 6 Jan 2023 16:53:06 -0800 |
4 | Subject: [PATCH] Replace LFS64 interfaces off64_t and lseek64 | 4 | Subject: [PATCH 1/2] Replace LFS64 interfaces off64_t and lseek64 |
5 | 5 | ||
6 | Musl does not define these interfaces unless -D_LARGEFILE64_SOURCE is | 6 | Musl does not define these interfaces unless -D_LARGEFILE64_SOURCE is |
7 | defined and that too it is transitional until apps switch to using 64bit | 7 | defined and that too it is transitional until apps switch to using 64-bit |
8 | off_t. We pass -D_LARGEFILE64_SOURCE in makefiles already therefore | 8 | off_t. We pass -D_FILE_OFFSET_BITS=64 in makefiles already therefore |
9 | original lseek and off_t are already 64bit | 9 | original lseek and off_t are already 64bit |
10 | 10 | ||
11 | This fixes build with latest musl which has dropped LFS64 interfaces [1] | 11 | This fixes build with latest musl which has dropped LFS64 interfaces [1] |
12 | 12 | ||
13 | [1] https://git.musl-libc.org/cgit/musl/commit/?id=246f1c811448f37a44b41cd8df8d0ef9736d95f4i | 13 | [1] https://git.musl-libc.org/cgit/musl/commit/?id=246f1c811448f37a44b41cd8df8d0ef9736d95f4i |
14 | 14 | ||
15 | Upstream-Status: Submitted [https://lore.kernel.org/linux-trace-devel/20230107010245.1290391-1-raj.khem@gmail.com/] | 15 | Upstream-Status: Submitted [https://lore.kernel.org/linux-trace-devel/20230109225315.1284538-1-raj.khem@gmail.com/] |
16 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | 16 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
17 | --- | 17 | --- |
18 | .../include/private/trace-cmd-private.h | 12 +- | 18 | .../include/private/trace-cmd-private.h | 12 +- |
@@ -27,7 +27,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
27 | 9 files changed, 142 insertions(+), 142 deletions(-) | 27 | 9 files changed, 142 insertions(+), 142 deletions(-) |
28 | 28 | ||
29 | diff --git a/lib/trace-cmd/include/private/trace-cmd-private.h b/lib/trace-cmd/include/private/trace-cmd-private.h | 29 | diff --git a/lib/trace-cmd/include/private/trace-cmd-private.h b/lib/trace-cmd/include/private/trace-cmd-private.h |
30 | index 271f0541..ac2d02c3 100644 | 30 | index 05c084ce..f2cf8dc8 100644 |
31 | --- a/lib/trace-cmd/include/private/trace-cmd-private.h | 31 | --- a/lib/trace-cmd/include/private/trace-cmd-private.h |
32 | +++ b/lib/trace-cmd/include/private/trace-cmd-private.h | 32 | +++ b/lib/trace-cmd/include/private/trace-cmd-private.h |
33 | @@ -106,7 +106,7 @@ const char *tracecmd_get_trace_clock(struct tracecmd_input *handle); | 33 | @@ -106,7 +106,7 @@ const char *tracecmd_get_trace_clock(struct tracecmd_input *handle); |
@@ -48,7 +48,7 @@ index 271f0541..ac2d02c3 100644 | |||
48 | int tracecmd_write_options(struct tracecmd_output *handle); | 48 | int tracecmd_write_options(struct tracecmd_output *handle); |
49 | int tracecmd_write_meta_strings(struct tracecmd_output *handle); | 49 | int tracecmd_write_meta_strings(struct tracecmd_output *handle); |
50 | int tracecmd_append_options(struct tracecmd_output *handle); | 50 | int tracecmd_append_options(struct tracecmd_output *handle); |
51 | @@ -393,7 +393,7 @@ struct tracecmd_msg_handle { | 51 | @@ -394,7 +394,7 @@ struct tracecmd_msg_handle { |
52 | short cpu_count; | 52 | short cpu_count; |
53 | short version; /* Current protocol version */ | 53 | short version; /* Current protocol version */ |
54 | unsigned long flags; | 54 | unsigned long flags; |
@@ -57,7 +57,7 @@ index 271f0541..ac2d02c3 100644 | |||
57 | bool done; | 57 | bool done; |
58 | bool cache; | 58 | bool cache; |
59 | int cfd; | 59 | int cfd; |
60 | @@ -542,8 +542,8 @@ int tracecmd_write_guest_time_shift(struct tracecmd_output *handle, | 60 | @@ -543,8 +543,8 @@ int tracecmd_write_guest_time_shift(struct tracecmd_output *handle, |
61 | struct tracecmd_compress_chunk { | 61 | struct tracecmd_compress_chunk { |
62 | unsigned int size; | 62 | unsigned int size; |
63 | unsigned int zsize; | 63 | unsigned int zsize; |
@@ -68,7 +68,7 @@ index 271f0541..ac2d02c3 100644 | |||
68 | }; | 68 | }; |
69 | struct tracecmd_compression; | 69 | struct tracecmd_compression; |
70 | struct tracecmd_compression_proto { | 70 | struct tracecmd_compression_proto { |
71 | @@ -569,7 +569,7 @@ int tracecmd_compress_buffer_read(struct tracecmd_compression *handle, char *dst | 71 | @@ -570,7 +570,7 @@ int tracecmd_compress_buffer_read(struct tracecmd_compression *handle, char *dst |
72 | int tracecmd_compress_pread(struct tracecmd_compression *handle, char *dst, int len, off_t offset); | 72 | int tracecmd_compress_pread(struct tracecmd_compression *handle, char *dst, int len, off_t offset); |
73 | int tracecmd_compress_buffer_write(struct tracecmd_compression *handle, | 73 | int tracecmd_compress_buffer_write(struct tracecmd_compression *handle, |
74 | const void *data, unsigned long long size); | 74 | const void *data, unsigned long long size); |
@@ -682,7 +682,7 @@ index 0b2de710..3a555c36 100644 | |||
682 | 682 | ||
683 | close(fd); | 683 | close(fd); |
684 | diff --git a/lib/trace-cmd/trace-output.c b/lib/trace-cmd/trace-output.c | 684 | diff --git a/lib/trace-cmd/trace-output.c b/lib/trace-cmd/trace-output.c |
685 | index bdec75d6..37bb3ec0 100644 | 685 | index 1c0f7b77..ad740d65 100644 |
686 | --- a/lib/trace-cmd/trace-output.c | 686 | --- a/lib/trace-cmd/trace-output.c |
687 | +++ b/lib/trace-cmd/trace-output.c | 687 | +++ b/lib/trace-cmd/trace-output.c |
688 | @@ -112,7 +112,7 @@ do_write_check(struct tracecmd_output *handle, const void *data, long long size) | 688 | @@ -112,7 +112,7 @@ do_write_check(struct tracecmd_output *handle, const void *data, long long size) |
@@ -703,7 +703,7 @@ index bdec75d6..37bb3ec0 100644 | |||
703 | } | 703 | } |
704 | 704 | ||
705 | static inline int do_preed(struct tracecmd_output *handle, void *dst, int len, off_t offset) | 705 | static inline int do_preed(struct tracecmd_output *handle, void *dst, int len, off_t offset) |
706 | @@ -518,12 +518,12 @@ out_write_section_header(struct tracecmd_output *handle, unsigned short header_i | 706 | @@ -526,12 +526,12 @@ out_write_section_header(struct tracecmd_output *handle, unsigned short header_i |
707 | /* Section ID */ | 707 | /* Section ID */ |
708 | endian2 = convert_endian_2(handle, header_id); | 708 | endian2 = convert_endian_2(handle, header_id); |
709 | if (do_write_check(handle, &endian2, 2)) | 709 | if (do_write_check(handle, &endian2, 2)) |
@@ -718,7 +718,7 @@ index bdec75d6..37bb3ec0 100644 | |||
718 | 718 | ||
719 | /* Section description */ | 719 | /* Section description */ |
720 | if (description) | 720 | if (description) |
721 | @@ -532,13 +532,13 @@ out_write_section_header(struct tracecmd_output *handle, unsigned short header_i | 721 | @@ -540,13 +540,13 @@ out_write_section_header(struct tracecmd_output *handle, unsigned short header_i |
722 | desc = -1; | 722 | desc = -1; |
723 | endian4 = convert_endian_4(handle, desc); | 723 | endian4 = convert_endian_4(handle, desc); |
724 | if (do_write_check(handle, &endian4, 4)) | 724 | if (do_write_check(handle, &endian4, 4)) |
@@ -734,7 +734,7 @@ index bdec75d6..37bb3ec0 100644 | |||
734 | return offset; | 734 | return offset; |
735 | } | 735 | } |
736 | 736 | ||
737 | @@ -559,13 +559,13 @@ __hidden int out_update_section_header(struct tracecmd_output *handle, tsize_t o | 737 | @@ -567,13 +567,13 @@ __hidden int out_update_section_header(struct tracecmd_output *handle, tsize_t o |
738 | if (size < 8) | 738 | if (size < 8) |
739 | return -1; | 739 | return -1; |
740 | size -= 8; | 740 | size -= 8; |
@@ -750,7 +750,7 @@ index bdec75d6..37bb3ec0 100644 | |||
750 | return -1; | 750 | return -1; |
751 | return 0; | 751 | return 0; |
752 | } | 752 | } |
753 | @@ -587,7 +587,7 @@ static int save_string_section(struct tracecmd_output *handle, bool compress) | 753 | @@ -595,7 +595,7 @@ static int save_string_section(struct tracecmd_output *handle, bool compress) |
754 | if (compress) | 754 | if (compress) |
755 | flags |= TRACECMD_SEC_FL_COMPRESS; | 755 | flags |= TRACECMD_SEC_FL_COMPRESS; |
756 | offset = out_write_section_header(handle, TRACECMD_OPTION_STRINGS, "strings", flags, false); | 756 | offset = out_write_section_header(handle, TRACECMD_OPTION_STRINGS, "strings", flags, false); |
@@ -759,7 +759,7 @@ index bdec75d6..37bb3ec0 100644 | |||
759 | return -1; | 759 | return -1; |
760 | 760 | ||
761 | out_compression_start(handle, compress); | 761 | out_compression_start(handle, compress); |
762 | @@ -637,7 +637,7 @@ static int read_header_files(struct tracecmd_output *handle, bool compress) | 762 | @@ -645,7 +645,7 @@ static int read_header_files(struct tracecmd_output *handle, bool compress) |
763 | flags |= TRACECMD_SEC_FL_COMPRESS; | 763 | flags |= TRACECMD_SEC_FL_COMPRESS; |
764 | offset = out_write_section_header(handle, TRACECMD_OPTION_HEADER_INFO, | 764 | offset = out_write_section_header(handle, TRACECMD_OPTION_HEADER_INFO, |
765 | "headers", flags, true); | 765 | "headers", flags, true); |
@@ -768,7 +768,7 @@ index bdec75d6..37bb3ec0 100644 | |||
768 | return -1; | 768 | return -1; |
769 | 769 | ||
770 | out_compression_start(handle, compress); | 770 | out_compression_start(handle, compress); |
771 | @@ -965,7 +965,7 @@ static int read_ftrace_files(struct tracecmd_output *handle, bool compress) | 771 | @@ -973,7 +973,7 @@ static int read_ftrace_files(struct tracecmd_output *handle, bool compress) |
772 | flags |= TRACECMD_SEC_FL_COMPRESS; | 772 | flags |= TRACECMD_SEC_FL_COMPRESS; |
773 | offset = out_write_section_header(handle, TRACECMD_OPTION_FTRACE_EVENTS, | 773 | offset = out_write_section_header(handle, TRACECMD_OPTION_FTRACE_EVENTS, |
774 | "ftrace events", flags, true); | 774 | "ftrace events", flags, true); |
@@ -777,7 +777,7 @@ index bdec75d6..37bb3ec0 100644 | |||
777 | return -1; | 777 | return -1; |
778 | 778 | ||
779 | create_event_list_item(handle, &systems, &list); | 779 | create_event_list_item(handle, &systems, &list); |
780 | @@ -1024,7 +1024,7 @@ static int read_event_files(struct tracecmd_output *handle, | 780 | @@ -1032,7 +1032,7 @@ static int read_event_files(struct tracecmd_output *handle, |
781 | flags |= TRACECMD_SEC_FL_COMPRESS; | 781 | flags |= TRACECMD_SEC_FL_COMPRESS; |
782 | offset = out_write_section_header(handle, TRACECMD_OPTION_EVENT_FORMATS, | 782 | offset = out_write_section_header(handle, TRACECMD_OPTION_EVENT_FORMATS, |
783 | "events format", flags, true); | 783 | "events format", flags, true); |
@@ -786,7 +786,7 @@ index bdec75d6..37bb3ec0 100644 | |||
786 | return -1; | 786 | return -1; |
787 | /* | 787 | /* |
788 | * If any of the list is the special keyword "all" then | 788 | * If any of the list is the special keyword "all" then |
789 | @@ -1138,7 +1138,7 @@ static int read_proc_kallsyms(struct tracecmd_output *handle, bool compress) | 789 | @@ -1146,7 +1146,7 @@ static int read_proc_kallsyms(struct tracecmd_output *handle, bool compress) |
790 | flags |= TRACECMD_SEC_FL_COMPRESS; | 790 | flags |= TRACECMD_SEC_FL_COMPRESS; |
791 | offset = out_write_section_header(handle, TRACECMD_OPTION_KALLSYMS, | 791 | offset = out_write_section_header(handle, TRACECMD_OPTION_KALLSYMS, |
792 | "kallsyms", flags, true); | 792 | "kallsyms", flags, true); |
@@ -795,7 +795,7 @@ index bdec75d6..37bb3ec0 100644 | |||
795 | return -1; | 795 | return -1; |
796 | 796 | ||
797 | out_compression_start(handle, compress); | 797 | out_compression_start(handle, compress); |
798 | @@ -1202,7 +1202,7 @@ static int read_ftrace_printk(struct tracecmd_output *handle, bool compress) | 798 | @@ -1210,7 +1210,7 @@ static int read_ftrace_printk(struct tracecmd_output *handle, bool compress) |
799 | if (compress) | 799 | if (compress) |
800 | flags |= TRACECMD_SEC_FL_COMPRESS; | 800 | flags |= TRACECMD_SEC_FL_COMPRESS; |
801 | offset = out_write_section_header(handle, TRACECMD_OPTION_PRINTK, "printk", flags, true); | 801 | offset = out_write_section_header(handle, TRACECMD_OPTION_PRINTK, "printk", flags, true); |
@@ -804,7 +804,7 @@ index bdec75d6..37bb3ec0 100644 | |||
804 | return -1; | 804 | return -1; |
805 | 805 | ||
806 | out_compression_start(handle, compress); | 806 | out_compression_start(handle, compress); |
807 | @@ -1247,8 +1247,8 @@ static int save_tracing_file_data(struct tracecmd_output *handle, | 807 | @@ -1255,8 +1255,8 @@ static int save_tracing_file_data(struct tracecmd_output *handle, |
808 | unsigned long long endian8; | 808 | unsigned long long endian8; |
809 | char *file = NULL; | 809 | char *file = NULL; |
810 | struct stat st; | 810 | struct stat st; |
@@ -815,7 +815,7 @@ index bdec75d6..37bb3ec0 100644 | |||
815 | int ret = -1; | 815 | int ret = -1; |
816 | 816 | ||
817 | file = get_tracing_file(handle, filename); | 817 | file = get_tracing_file(handle, filename); |
818 | @@ -1842,9 +1842,9 @@ static int write_options_v6(struct tracecmd_output *handle) | 818 | @@ -1850,9 +1850,9 @@ static int write_options_v6(struct tracecmd_output *handle) |
819 | return 0; | 819 | return 0; |
820 | } | 820 | } |
821 | 821 | ||
@@ -827,7 +827,7 @@ index bdec75d6..37bb3ec0 100644 | |||
827 | return -1; | 827 | return -1; |
828 | offset = convert_endian_8(handle, offset); | 828 | offset = convert_endian_8(handle, offset); |
829 | if (do_write_check(handle, &offset, 8)) | 829 | if (do_write_check(handle, &offset, 8)) |
830 | @@ -1867,7 +1867,7 @@ static int update_options_start(struct tracecmd_output *handle, off64_t offset) | 830 | @@ -1875,7 +1875,7 @@ static int update_options_start(struct tracecmd_output *handle, off64_t offset) |
831 | * | 831 | * |
832 | * Returns zero on success and -1 on error. | 832 | * Returns zero on success and -1 on error. |
833 | */ | 833 | */ |
@@ -836,7 +836,7 @@ index bdec75d6..37bb3ec0 100644 | |||
836 | { | 836 | { |
837 | tsize_t curr; | 837 | tsize_t curr; |
838 | int ret; | 838 | int ret; |
839 | @@ -1887,7 +1887,7 @@ int tracecmd_prepare_options(struct tracecmd_output *handle, off64_t offset, int | 839 | @@ -1895,7 +1895,7 @@ int tracecmd_prepare_options(struct tracecmd_output *handle, off64_t offset, int |
840 | break; | 840 | break; |
841 | case SEEK_END: | 841 | case SEEK_END: |
842 | offset = do_lseek(handle, offset, SEEK_END); | 842 | offset = do_lseek(handle, offset, SEEK_END); |
@@ -845,7 +845,7 @@ index bdec75d6..37bb3ec0 100644 | |||
845 | return -1; | 845 | return -1; |
846 | break; | 846 | break; |
847 | } | 847 | } |
848 | @@ -2059,7 +2059,7 @@ __hidden void *trace_get_options(struct tracecmd_output *handle, size_t *len) | 848 | @@ -2067,7 +2067,7 @@ __hidden void *trace_get_options(struct tracecmd_output *handle, size_t *len) |
849 | if (!buf) | 849 | if (!buf) |
850 | goto out; | 850 | goto out; |
851 | 851 | ||
@@ -854,7 +854,7 @@ index bdec75d6..37bb3ec0 100644 | |||
854 | goto out; | 854 | goto out; |
855 | *len = read(msg_handle.cfd, buf, offset); | 855 | *len = read(msg_handle.cfd, buf, offset); |
856 | if (*len != offset) { | 856 | if (*len != offset) { |
857 | @@ -2270,7 +2270,7 @@ int tracecmd_write_cmdlines(struct tracecmd_output *handle) | 857 | @@ -2278,7 +2278,7 @@ int tracecmd_write_cmdlines(struct tracecmd_output *handle) |
858 | flags |= TRACECMD_SEC_FL_COMPRESS; | 858 | flags |= TRACECMD_SEC_FL_COMPRESS; |
859 | offset = out_write_section_header(handle, TRACECMD_OPTION_CMDLINES, | 859 | offset = out_write_section_header(handle, TRACECMD_OPTION_CMDLINES, |
860 | "command lines", flags, true); | 860 | "command lines", flags, true); |
@@ -863,7 +863,7 @@ index bdec75d6..37bb3ec0 100644 | |||
863 | return -1; | 863 | return -1; |
864 | 864 | ||
865 | out_compression_start(handle, compress); | 865 | out_compression_start(handle, compress); |
866 | @@ -2519,7 +2519,7 @@ static int update_buffer_cpu_offset_v6(struct tracecmd_output *handle, | 866 | @@ -2527,7 +2527,7 @@ static int update_buffer_cpu_offset_v6(struct tracecmd_output *handle, |
867 | current = do_lseek(handle, 0, SEEK_CUR); | 867 | current = do_lseek(handle, 0, SEEK_CUR); |
868 | 868 | ||
869 | /* Go to the option data, where will write the offest */ | 869 | /* Go to the option data, where will write the offest */ |
@@ -872,7 +872,7 @@ index bdec75d6..37bb3ec0 100644 | |||
872 | tracecmd_warning("could not seek to %lld", b_offset); | 872 | tracecmd_warning("could not seek to %lld", b_offset); |
873 | return -1; | 873 | return -1; |
874 | } | 874 | } |
875 | @@ -2528,7 +2528,7 @@ static int update_buffer_cpu_offset_v6(struct tracecmd_output *handle, | 875 | @@ -2536,7 +2536,7 @@ static int update_buffer_cpu_offset_v6(struct tracecmd_output *handle, |
876 | return -1; | 876 | return -1; |
877 | 877 | ||
878 | /* Go back to end of file */ | 878 | /* Go back to end of file */ |
@@ -881,7 +881,7 @@ index bdec75d6..37bb3ec0 100644 | |||
881 | tracecmd_warning("could not seek to %lld", offset); | 881 | tracecmd_warning("could not seek to %lld", offset); |
882 | return -1; | 882 | return -1; |
883 | } | 883 | } |
884 | @@ -2652,7 +2652,7 @@ __hidden int out_write_cpu_data(struct tracecmd_output *handle, | 884 | @@ -2660,7 +2660,7 @@ __hidden int out_write_cpu_data(struct tracecmd_output *handle, |
885 | data_files[i].data_offset &= ~(page_size - 1); | 885 | data_files[i].data_offset &= ~(page_size - 1); |
886 | 886 | ||
887 | ret = do_lseek(handle, data_files[i].data_offset, SEEK_SET); | 887 | ret = do_lseek(handle, data_files[i].data_offset, SEEK_SET); |
@@ -890,7 +890,7 @@ index bdec75d6..37bb3ec0 100644 | |||
890 | goto out_free; | 890 | goto out_free; |
891 | 891 | ||
892 | if (!tracecmd_get_quiet(handle)) | 892 | if (!tracecmd_get_quiet(handle)) |
893 | @@ -2660,7 +2660,7 @@ __hidden int out_write_cpu_data(struct tracecmd_output *handle, | 893 | @@ -2668,7 +2668,7 @@ __hidden int out_write_cpu_data(struct tracecmd_output *handle, |
894 | i, (unsigned long long)data_files[i].data_offset); | 894 | i, (unsigned long long)data_files[i].data_offset); |
895 | 895 | ||
896 | if (data[i].size) { | 896 | if (data[i].size) { |
@@ -899,7 +899,7 @@ index bdec75d6..37bb3ec0 100644 | |||
899 | goto out_free; | 899 | goto out_free; |
900 | read_size = out_copy_fd_compress(handle, data[i].fd, | 900 | read_size = out_copy_fd_compress(handle, data[i].fd, |
901 | data[i].size, &data_files[i].write_size, | 901 | data[i].size, &data_files[i].write_size, |
902 | @@ -2678,19 +2678,19 @@ __hidden int out_write_cpu_data(struct tracecmd_output *handle, | 902 | @@ -2686,19 +2686,19 @@ __hidden int out_write_cpu_data(struct tracecmd_output *handle, |
903 | 903 | ||
904 | if (!HAS_SECTIONS(handle)) { | 904 | if (!HAS_SECTIONS(handle)) { |
905 | /* Write the real CPU data offset in the file */ | 905 | /* Write the real CPU data offset in the file */ |
@@ -922,7 +922,7 @@ index bdec75d6..37bb3ec0 100644 | |||
922 | goto out_free; | 922 | goto out_free; |
923 | } | 923 | } |
924 | if (!tracecmd_get_quiet(handle)) { | 924 | if (!tracecmd_get_quiet(handle)) { |
925 | @@ -2709,7 +2709,7 @@ __hidden int out_write_cpu_data(struct tracecmd_output *handle, | 925 | @@ -2717,7 +2717,7 @@ __hidden int out_write_cpu_data(struct tracecmd_output *handle, |
926 | goto out_free; | 926 | goto out_free; |
927 | 927 | ||
928 | free(data_files); | 928 | free(data_files); |
@@ -931,7 +931,7 @@ index bdec75d6..37bb3ec0 100644 | |||
931 | return -1; | 931 | return -1; |
932 | 932 | ||
933 | if (out_update_section_header(handle, offset)) | 933 | if (out_update_section_header(handle, offset)) |
934 | @@ -2978,7 +2978,7 @@ __hidden int out_save_options_offset(struct tracecmd_output *handle, unsigned lo | 934 | @@ -2986,7 +2986,7 @@ __hidden int out_save_options_offset(struct tracecmd_output *handle, unsigned lo |
935 | return -1; | 935 | return -1; |
936 | 936 | ||
937 | new = do_lseek(handle, 0, SEEK_CUR); | 937 | new = do_lseek(handle, 0, SEEK_CUR); |
@@ -940,7 +940,7 @@ index bdec75d6..37bb3ec0 100644 | |||
940 | return -1; | 940 | return -1; |
941 | 941 | ||
942 | en8 = convert_endian_8(handle, start); | 942 | en8 = convert_endian_8(handle, start); |
943 | @@ -2986,7 +2986,7 @@ __hidden int out_save_options_offset(struct tracecmd_output *handle, unsigned lo | 943 | @@ -2994,7 +2994,7 @@ __hidden int out_save_options_offset(struct tracecmd_output *handle, unsigned lo |
944 | return -1; | 944 | return -1; |
945 | 945 | ||
946 | handle->options_start = new; | 946 | handle->options_start = new; |
@@ -950,7 +950,7 @@ index bdec75d6..37bb3ec0 100644 | |||
950 | } else { | 950 | } else { |
951 | handle->options_start = start; | 951 | handle->options_start = start; |
952 | diff --git a/lib/trace-cmd/trace-recorder.c b/lib/trace-cmd/trace-recorder.c | 952 | diff --git a/lib/trace-cmd/trace-recorder.c b/lib/trace-cmd/trace-recorder.c |
953 | index f387091f..a5ac8be3 100644 | 953 | index 23499f30..c172ad64 100644 |
954 | --- a/lib/trace-cmd/trace-recorder.c | 954 | --- a/lib/trace-cmd/trace-recorder.c |
955 | +++ b/lib/trace-cmd/trace-recorder.c | 955 | +++ b/lib/trace-cmd/trace-recorder.c |
956 | @@ -51,7 +51,7 @@ static int append_file(int size, int dst, int src) | 956 | @@ -51,7 +51,7 @@ static int append_file(int size, int dst, int src) |
diff --git a/meta-oe/recipes-kernel/trace-cmd/files/0002-Drop-using-_LARGEFILE64_SOURCE.patch b/meta-oe/recipes-kernel/trace-cmd/files/0002-Drop-using-_LARGEFILE64_SOURCE.patch new file mode 100644 index 0000000000..7b2ea79eb3 --- /dev/null +++ b/meta-oe/recipes-kernel/trace-cmd/files/0002-Drop-using-_LARGEFILE64_SOURCE.patch | |||
@@ -0,0 +1,145 @@ | |||
1 | From 47005e155c291ee6a2460cbf9eee604997e87063 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Mon, 9 Jan 2023 14:48:49 -0800 | ||
4 | Subject: [PATCH 2/2] Drop using _LARGEFILE64_SOURCE | ||
5 | |||
6 | Its no longer needed since we have dropped using LF64 interfaces | ||
7 | |||
8 | Upstream-Status: Submitted [https://lore.kernel.org/linux-trace-devel/20230109225315.1284538-2-raj.khem@gmail.com/T/#u] | ||
9 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
10 | --- | ||
11 | lib/trace-cmd/trace-input.c | 1 - | ||
12 | lib/trace-cmd/trace-output.c | 1 - | ||
13 | lib/trace-cmd/trace-recorder.c | 1 - | ||
14 | tracecmd/trace-hist.c | 1 - | ||
15 | tracecmd/trace-listen.c | 1 - | ||
16 | tracecmd/trace-mem.c | 1 - | ||
17 | tracecmd/trace-profile.c | 1 - | ||
18 | tracecmd/trace-read.c | 1 - | ||
19 | tracecmd/trace-restore.c | 1 - | ||
20 | tracecmd/trace-split.c | 1 - | ||
21 | 10 files changed, 10 deletions(-) | ||
22 | |||
23 | diff --git a/lib/trace-cmd/trace-input.c b/lib/trace-cmd/trace-input.c | ||
24 | index 9b128403..3dd13ce4 100644 | ||
25 | --- a/lib/trace-cmd/trace-input.c | ||
26 | +++ b/lib/trace-cmd/trace-input.c | ||
27 | @@ -3,7 +3,6 @@ | ||
28 | * Copyright (C) 2009, 2010 Red Hat Inc, Steven Rostedt <srostedt@redhat.com> | ||
29 | * | ||
30 | */ | ||
31 | -#define _LARGEFILE64_SOURCE | ||
32 | #include <stdbool.h> | ||
33 | #include <stdio.h> | ||
34 | #include <stdlib.h> | ||
35 | diff --git a/lib/trace-cmd/trace-output.c b/lib/trace-cmd/trace-output.c | ||
36 | index ad740d65..eee847e3 100644 | ||
37 | --- a/lib/trace-cmd/trace-output.c | ||
38 | +++ b/lib/trace-cmd/trace-output.c | ||
39 | @@ -3,7 +3,6 @@ | ||
40 | * Copyright (C) 2009, 2010 Red Hat Inc, Steven Rostedt <srostedt@redhat.com> | ||
41 | * | ||
42 | */ | ||
43 | -#define _LARGEFILE64_SOURCE | ||
44 | #include <dirent.h> | ||
45 | #include <stdio.h> | ||
46 | #include <stdlib.h> | ||
47 | diff --git a/lib/trace-cmd/trace-recorder.c b/lib/trace-cmd/trace-recorder.c | ||
48 | index c172ad64..70ce52e2 100644 | ||
49 | --- a/lib/trace-cmd/trace-recorder.c | ||
50 | +++ b/lib/trace-cmd/trace-recorder.c | ||
51 | @@ -3,7 +3,6 @@ | ||
52 | * Copyright (C) 2009, 2010 Red Hat Inc, Steven Rostedt <srostedt@redhat.com> | ||
53 | * | ||
54 | */ | ||
55 | -#define _LARGEFILE64_SOURCE | ||
56 | #include <stdio.h> | ||
57 | #include <stdlib.h> | ||
58 | #include <fcntl.h> | ||
59 | diff --git a/tracecmd/trace-hist.c b/tracecmd/trace-hist.c | ||
60 | index efb790ac..62fe4f9b 100644 | ||
61 | --- a/tracecmd/trace-hist.c | ||
62 | +++ b/tracecmd/trace-hist.c | ||
63 | @@ -5,7 +5,6 @@ | ||
64 | * Several of the ideas in this file came from Arnaldo Carvalho de Melo's | ||
65 | * work on the perf ui. | ||
66 | */ | ||
67 | -#define _LARGEFILE64_SOURCE | ||
68 | #include <dirent.h> | ||
69 | #include <stdio.h> | ||
70 | #include <stdlib.h> | ||
71 | diff --git a/tracecmd/trace-listen.c b/tracecmd/trace-listen.c | ||
72 | index 86d2b9e9..e95c5711 100644 | ||
73 | --- a/tracecmd/trace-listen.c | ||
74 | +++ b/tracecmd/trace-listen.c | ||
75 | @@ -3,7 +3,6 @@ | ||
76 | * Copyright (C) 2009, 2010 Red Hat Inc, Steven Rostedt <srostedt@redhat.com> | ||
77 | * | ||
78 | */ | ||
79 | -#define _LARGEFILE64_SOURCE | ||
80 | #include <dirent.h> | ||
81 | #include <stdio.h> | ||
82 | #include <stdlib.h> | ||
83 | diff --git a/tracecmd/trace-mem.c b/tracecmd/trace-mem.c | ||
84 | index 25eb0861..3e1ac9f3 100644 | ||
85 | --- a/tracecmd/trace-mem.c | ||
86 | +++ b/tracecmd/trace-mem.c | ||
87 | @@ -11,7 +11,6 @@ | ||
88 | * was written for the newer version. I decided to do some of it here | ||
89 | * in C. | ||
90 | */ | ||
91 | -#define _LARGEFILE64_SOURCE | ||
92 | #include <dirent.h> | ||
93 | #include <stdio.h> | ||
94 | #include <stdlib.h> | ||
95 | diff --git a/tracecmd/trace-profile.c b/tracecmd/trace-profile.c | ||
96 | index 6a2cc3d0..d12a0e5e 100644 | ||
97 | --- a/tracecmd/trace-profile.c | ||
98 | +++ b/tracecmd/trace-profile.c | ||
99 | @@ -5,7 +5,6 @@ | ||
100 | */ | ||
101 | |||
102 | /** FIXME: Convert numbers based on machine and file */ | ||
103 | -#define _LARGEFILE64_SOURCE | ||
104 | #include <stdio.h> | ||
105 | #include <stdlib.h> | ||
106 | #include <string.h> | ||
107 | diff --git a/tracecmd/trace-read.c b/tracecmd/trace-read.c | ||
108 | index c094ad6a..52ba818e 100644 | ||
109 | --- a/tracecmd/trace-read.c | ||
110 | +++ b/tracecmd/trace-read.c | ||
111 | @@ -3,7 +3,6 @@ | ||
112 | * Copyright (C) 2009, 2010 Red Hat Inc, Steven Rostedt <srostedt@redhat.com> | ||
113 | * | ||
114 | */ | ||
115 | -#define _LARGEFILE64_SOURCE | ||
116 | #include <dirent.h> | ||
117 | #include <stdio.h> | ||
118 | #include <stdlib.h> | ||
119 | diff --git a/tracecmd/trace-restore.c b/tracecmd/trace-restore.c | ||
120 | index 5bf29c52..e9ca3225 100644 | ||
121 | --- a/tracecmd/trace-restore.c | ||
122 | +++ b/tracecmd/trace-restore.c | ||
123 | @@ -3,7 +3,6 @@ | ||
124 | * Copyright (C) 2009, 2010 Red Hat Inc, Steven Rostedt <srostedt@redhat.com> | ||
125 | * | ||
126 | */ | ||
127 | -#define _LARGEFILE64_SOURCE | ||
128 | #include <dirent.h> | ||
129 | #include <stdio.h> | ||
130 | #include <stdlib.h> | ||
131 | diff --git a/tracecmd/trace-split.c b/tracecmd/trace-split.c | ||
132 | index 851ec94e..1daa847d 100644 | ||
133 | --- a/tracecmd/trace-split.c | ||
134 | +++ b/tracecmd/trace-split.c | ||
135 | @@ -3,7 +3,6 @@ | ||
136 | * Copyright (C) 2010 Red Hat Inc, Steven Rostedt <srostedt@redhat.com> | ||
137 | * | ||
138 | */ | ||
139 | -#define _LARGEFILE64_SOURCE | ||
140 | #include <dirent.h> | ||
141 | #include <stdio.h> | ||
142 | #include <stdlib.h> | ||
143 | -- | ||
144 | 2.39.0 | ||
145 | |||
diff --git a/meta-oe/recipes-kernel/trace-cmd/trace-cmd_3.1.5.bb b/meta-oe/recipes-kernel/trace-cmd/trace-cmd_3.1.5.bb index 50d73df03a..d8909bd690 100644 --- a/meta-oe/recipes-kernel/trace-cmd/trace-cmd_3.1.5.bb +++ b/meta-oe/recipes-kernel/trace-cmd/trace-cmd_3.1.5.bb | |||
@@ -8,6 +8,7 @@ LIC_FILES_CHKSUM = " \ | |||
8 | 8 | ||
9 | SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/trace-cmd.git;branch=master \ | 9 | SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/trace-cmd.git;branch=master \ |
10 | file://0001-Replace-LFS64-interfaces-off64_t-and-lseek64.patch \ | 10 | file://0001-Replace-LFS64-interfaces-off64_t-and-lseek64.patch \ |
11 | file://0002-Drop-using-_LARGEFILE64_SOURCE.patch \ | ||
11 | file://0001-Do-not-emit-useless-rpath.patch" | 12 | file://0001-Do-not-emit-useless-rpath.patch" |
12 | SRCREV = "18233e4c32857cb7ddd4960beeec8360ed834fc5" | 13 | SRCREV = "18233e4c32857cb7ddd4960beeec8360ed834fc5" |
13 | 14 | ||