[arch-commits] Commit in deepin-anything-arch/trunk (PKGBUILD linux-5.0.patch)

Jan Steffens heftig at archlinux.org
Mon Mar 4 21:10:42 UTC 2019


    Date: Monday, March 4, 2019 @ 21:10:42
  Author: heftig
Revision: 437633

0.0.4-7: kernel 5.0.arch1-1

Added:
  deepin-anything-arch/trunk/linux-5.0.patch
Modified:
  deepin-anything-arch/trunk/PKGBUILD

-----------------+
 PKGBUILD        |    9 +++++--
 linux-5.0.patch |   64 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 70 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2019-03-04 21:10:37 UTC (rev 437632)
+++ PKGBUILD	2019-03-04 21:10:42 UTC (rev 437633)
@@ -3,7 +3,7 @@
 pkgname=deepin-anything-arch
 pkgver=0.0.4
 _extramodules=extramodules-ARCH
-pkgrel=6
+pkgrel=7
 pkgdesc="Deepin Anything file search tool, kernel module for Arch kernel"
 arch=('x86_64')
 url="https://github.com/linuxdeepin/deepin-anything"
@@ -13,13 +13,16 @@
 provides=('DEEPIN-ANYTHING-MODULE')
 replaces=('deepin-anything-module')
 source=("$pkgname-$pkgver.tar.gz::https://github.com/linuxdeepin/deepin-anything/archive/$pkgver.tar.gz"
-        linux-4.20.patch)
+        linux-4.20.patch
+        linux-5.0.patch)
 sha512sums=('fcb7683ce3bef818ac06dd62f14b5624669f9c09b53c5f08e319b724f5408bc221154428a6436d9e2a68aa6444e966c494c8a7611dfed0c93b6b9e71a3da0f55'
-            'dc3c85e9535cc589fdf56d265c4330519c92b5bcc406153e3162ba6ef5e799b702c394e1961132770f4f3ddd288dbbfe74a9d8056329e4585eb5a2094ffe0155')
+            'dc3c85e9535cc589fdf56d265c4330519c92b5bcc406153e3162ba6ef5e799b702c394e1961132770f4f3ddd288dbbfe74a9d8056329e4585eb5a2094ffe0155'
+            '6179fae5263d651279e073b4e116cf5fd1986614a0f3129927c39f462cc2ff12bb7c118b64ddbd31399a752d6b177df517133ae634d38146465fe97f49dc31d4')
 
 prepare() {
   cd deepin-anything-$pkgver
   patch -p1 -i ../linux-4.20.patch
+  patch -p1 -i ../linux-5.0.patch
 }
 
 build() {

Added: linux-5.0.patch
===================================================================
--- linux-5.0.patch	                        (rev 0)
+++ linux-5.0.patch	2019-03-04 21:10:42 UTC (rev 437633)
@@ -0,0 +1,64 @@
+diff -u -r deepin-anything-0.0.4/kernelmod/vfs_change.c deepin-anything-0.0.4-5.0/kernelmod/vfs_change.c
+--- deepin-anything-0.0.4/kernelmod/vfs_change.c	2019-03-04 19:59:13.782355964 +0000
++++ deepin-anything-0.0.4-5.0/kernelmod/vfs_change.c	2019-03-04 20:17:05.425142691 +0000
+@@ -15,7 +15,7 @@
+ #endif
+ 
+ typedef struct __vfs_change__ {
+-	struct timeval ts;
++	struct timespec64 ts;
+ 	char *src, *dst;
+ 	unsigned char action;
+ 	unsigned short size;
+@@ -77,7 +77,7 @@
+ 		return -EBUSY;
+ 	}
+ 
+-	struct timeval* tv = kzalloc(sizeof(struct timeval), GFP_KERNEL);
++	struct timespec64* tv = kzalloc(sizeof(struct timespec64), GFP_KERNEL);
+ 	if (unlikely(tv == 0)) {
+ 		atomic_set(&vfs_changes_is_open, 0);
+ 		return -ENOMEM;
+@@ -104,13 +104,13 @@
+ 
+ #define MIN_LINE_SIZE	50
+ 
+-static ssize_t copy_vfs_changes(struct timeval *last, char* buf, size_t size)
++static ssize_t copy_vfs_changes(struct timespec64 *last, char* buf, size_t size)
+ {
+ 	size_t total = 0;
+ 	vfs_change* vc;
+ 	list_for_each_entry(vc, &vfs_changes, list) {
+ 		if (vc->ts.tv_sec < last->tv_sec || 
+-			(vc->ts.tv_sec == last->tv_sec && vc->ts.tv_usec <= last->tv_usec))
++			(vc->ts.tv_sec == last->tv_sec && vc->ts.tv_nsec <= last->tv_nsec))
+ 			continue;
+ 
+ 		time_t shifted_secs = vc->ts.tv_sec + hour_shift*3600;
+@@ -122,7 +122,7 @@
+ #endif
+ 		char temp[MIN_LINE_SIZE];
+ 		snprintf(temp, sizeof(temp), "%04ld-%02d-%02d %02d:%02d:%02d.%03ld %s ",
+-			1900+ts.tm_year, 1+ts.tm_mon, ts.tm_mday, ts.tm_hour, ts.tm_min, ts.tm_sec, vc->ts.tv_usec/1000, 
++			1900+ts.tm_year, 1+ts.tm_mon, ts.tm_mday, ts.tm_hour, ts.tm_min, ts.tm_sec, vc->ts.tv_nsec/1000000, 
+ 			action_names[vc->action]);
+ 		size_t line_len = strlen(temp) + strlen(vc->src) + 1;  //+1 for \n
+ 		if (vc->dst)
+@@ -158,7 +158,7 @@
+ 	if (kbuf == 0)
+ 		return -ENOMEM;
+ 
+-	struct timeval *last = (struct timeval*)filp->private_data;
++	struct timespec64 *last = (struct timespec64*)filp->private_data;
+ 	spin_lock(&sl_changes);
+ 	ssize_t r = copy_vfs_changes(last, kbuf, size);
+ 	spin_unlock(&sl_changes);
+@@ -585,7 +585,7 @@
+ 		strcat(full_dst, dst);
+ 	}
+ 	vfs_change* vc = (vfs_change*)p;
+-	do_gettimeofday(&vc->ts);
++	ktime_get_real_ts64(&vc->ts);
+ 	vc->size = size;
+ 	vc->action = act;
+ 	vc->src = full_src;



More information about the arch-commits mailing list