]> git.pld-linux.org Git - packages/nfs-utils.git/blobdiff - nfs-utils-types.patch
- rediffed statdpath patch
[packages/nfs-utils.git] / nfs-utils-types.patch
index 87ac8f96405598cd5add748862e4cd8c7f14ab75..3ee52d39d2b54d9c265e3562f7661cd03bc6a432 100644 (file)
---- nfs-utils-2.3.4/utils/nfsdcld/sqlite.c.orig        2019-05-10 21:09:49.000000000 +0200
-+++ nfs-utils-2.3.4/utils/nfsdcld/sqlite.c     2019-06-01 21:18:49.456790606 +0200
-@@ -55,7 +55,7 @@
- #include <fcntl.h>
- #include <unistd.h>
- #include <stdlib.h>
--#include <stdint.h>
-+#include <inttypes.h>
- #include <limits.h>
- #include <sqlite3.h>
- #include <linux/limits.h>
-@@ -535,7 +535,7 @@
-               xlog(L_ERROR, "Unable to begin transaction: %s", err);
-               goto rollback;
-       }
--      ret = snprintf(buf, sizeof(buf), "DELETE FROM \"rec-%016lx\";",
-+      ret = snprintf(buf, sizeof(buf), "DELETE FROM \"rec-%016"PRIx64"\";",
-                       current_epoch);
-       if (ret < 0) {
-               xlog(L_ERROR, "sprintf failed!");
-@@ -550,7 +550,7 @@
-               xlog(L_ERROR, "Unable to clear records from current epoch: %s", err);
-               goto rollback;
-       }
--      ret = snprintf(buf, sizeof(buf), "INSERT INTO \"rec-%016lx\" "
-+      ret = snprintf(buf, sizeof(buf), "INSERT INTO \"rec-%016"PRIx64"\" "
-                               "SELECT id FROM attached.clients;",
-                               current_epoch);
-       if (ret < 0) {
-@@ -703,7 +703,7 @@
-       int ret;
-       sqlite3_stmt *stmt = NULL;
--      ret = snprintf(buf, sizeof(buf), "INSERT OR REPLACE INTO \"rec-%016lx\" "
-+      ret = snprintf(buf, sizeof(buf), "INSERT OR REPLACE INTO \"rec-%016"PRIx64"\" "
-                               "VALUES (?);", current_epoch);
-       if (ret < 0) {
-               xlog(L_ERROR, "sprintf failed!");
-@@ -748,7 +748,7 @@
-       int ret;
-       sqlite3_stmt *stmt = NULL;
--      ret = snprintf(buf, sizeof(buf), "DELETE FROM \"rec-%016lx\" "
-+      ret = snprintf(buf, sizeof(buf), "DELETE FROM \"rec-%016"PRIx64"\" "
-                               "WHERE id==?;", current_epoch);
-       if (ret < 0) {
-               xlog(L_ERROR, "sprintf failed!");
-@@ -798,7 +798,7 @@
-       int ret;
-       sqlite3_stmt *stmt = NULL;
--      ret = snprintf(buf, sizeof(buf), "SELECT count(*) FROM  \"rec-%016lx\" "
-+      ret = snprintf(buf, sizeof(buf), "SELECT count(*) FROM  \"rec-%016"PRIx64"\" "
-                               "WHERE id==?;", recovery_epoch);
-       if (ret < 0) {
-               xlog(L_ERROR, "sprintf failed!");
-@@ -873,7 +873,7 @@
-               tcur++;
-               ret = snprintf(buf, sizeof(buf), "UPDATE grace "
--                              "SET current = %ld, recovery = %ld;",
-+                              "SET current = %"PRId64", recovery = %"PRId64";",
-                               (int64_t)tcur, (int64_t)trec);
-               if (ret < 0) {
-                       xlog(L_ERROR, "sprintf failed!");
-@@ -891,7 +891,7 @@
-                       goto rollback;
-               }
+--- nfs-utils-2.4.3/utils/nfsdcltrack/nfsdcltrack.c.orig       2020-05-17 08:13:59.744382256 +0200
++++ nfs-utils-2.4.3/utils/nfsdcltrack/nfsdcltrack.c    2020-05-17 08:19:47.068916900 +0200
+@@ -525,7 +525,7 @@
+       if (*tail)
+               return -EINVAL;
  
--              ret = snprintf(buf, sizeof(buf), "CREATE TABLE \"rec-%016lx\" "
-+              ret = snprintf(buf, sizeof(buf), "CREATE TABLE \"rec-%016"PRIx64"\" "
-                               "(id BLOB PRIMARY KEY);",
-                               tcur);
-               if (ret < 0) {
-@@ -915,7 +915,7 @@
-                * values in the grace table, just clear out the records for
-                * the current reboot epoch.
-                */
--              ret = snprintf(buf, sizeof(buf), "DELETE FROM \"rec-%016lx\";",
-+              ret = snprintf(buf, sizeof(buf), "DELETE FROM \"rec-%016"PRIx64"\";",
-                               tcur);
-               if (ret < 0) {
-                       xlog(L_ERROR, "sprintf failed!");
-@@ -976,7 +976,7 @@
-               goto rollback;
-       }
+-      xlog(D_GENERAL, "%s: grace done. gracetime=%ld", __func__, gracetime);
++      xlog(D_GENERAL, "%s: grace done. gracetime=%lld", __func__, (long long)gracetime);
  
--      ret = snprintf(buf, sizeof(buf), "DROP TABLE \"rec-%016lx\";",
-+      ret = snprintf(buf, sizeof(buf), "DROP TABLE \"rec-%016"PRIx64"\";",
-               recovery_epoch);
-       if (ret < 0) {
-               xlog(L_ERROR, "sprintf failed!");
-@@ -1027,7 +1027,7 @@
-               return -EINVAL;
-       }
+       ret = sqlite_remove_unreclaimed(gracetime);
  
--      ret = snprintf(buf, sizeof(buf), "SELECT * FROM \"rec-%016lx\";",
-+      ret = snprintf(buf, sizeof(buf), "SELECT * FROM \"rec-%016"PRIx64"\";",
-               recovery_epoch);
-       if (ret < 0) {
-               xlog(L_ERROR, "sprintf failed!");
This page took 0.175874 seconds and 4 git commands to generate.