4850ab86da
This fixes the issue of systemd sending tons of useless PropertiesChanged messages when a mount happens as described in: https://bugzilla.redhat.com/show_bug.cgi?id=1793527 Depends-On: https://review.opendev.org/c/starlingx/tools/+/786601 Partial-Bug: #1924691 Signed-off-by: Li Zhou <li.zhou@windriver.com> Change-Id: I3596303d77211a135e8559a05806395328725cde
81 lines
3.7 KiB
Diff
81 lines
3.7 KiB
Diff
From 339ea8b005c037eaad217dfd3cc10b2b110bdd28 Mon Sep 17 00:00:00 2001
|
|
Message-Id: <339ea8b005c037eaad217dfd3cc10b2b110bdd28.1574264572.git.Jim.Somerville@windriver.com>
|
|
In-Reply-To: <8b63ddb68a39d48ebb621d76a2b1f07f5ff67ac7.1574264572.git.Jim.Somerville@windriver.com>
|
|
References: <8b63ddb68a39d48ebb621d76a2b1f07f5ff67ac7.1574264572.git.Jim.Somerville@windriver.com>
|
|
From: Shuicheng Lin <shuicheng.lin@intel.com>
|
|
Date: Tue, 2 Apr 2019 16:43:03 +0000
|
|
Subject: [PATCH 3/3] Fix compile failure due to deprecated value
|
|
|
|
Issue occur after upgrade build tool chain. Fix it per tool chain's
|
|
suggestion.
|
|
Error message is like below:
|
|
"
|
|
Value MHD_HTTP_REQUEST_ENTITY_TOO_LARGE is deprecated,
|
|
use MHD_HTTP_PAYLOAD_TOO_LARGE [-Werror]
|
|
Value MHD_HTTP_METHOD_NOT_ACCEPTABLE is deprecated,
|
|
use MHD_HTTP_NOT_ACCEPTABLE [-Werror]
|
|
"
|
|
|
|
Signed-off-by: Shuicheng Lin <shuicheng.lin@intel.com>
|
|
Signed-off-by: Mawrer Ramirez <mawrer.a.ramirez.martinez@intel.com>
|
|
Signed-off-by: Jim Somerville <Jim.Somerville@windriver.com>
|
|
---
|
|
src/journal-remote/journal-gatewayd.c | 4 ++--
|
|
src/journal-remote/journal-remote.c | 6 +++---
|
|
2 files changed, 5 insertions(+), 5 deletions(-)
|
|
|
|
diff --git a/src/journal-remote/journal-gatewayd.c b/src/journal-remote/journal-gatewayd.c
|
|
index d1f0ce3..8364044 100644
|
|
--- a/src/journal-remote/journal-gatewayd.c
|
|
+++ b/src/journal-remote/journal-gatewayd.c
|
|
@@ -684,7 +684,7 @@ static int request_handler_file(
|
|
if (fstat(fd, &st) < 0)
|
|
return mhd_respondf(connection, MHD_HTTP_INTERNAL_SERVER_ERROR, "Failed to stat file: %m\n");
|
|
|
|
- response = MHD_create_response_from_fd_at_offset(st.st_size, fd, 0);
|
|
+ response = MHD_create_response_from_fd_at_offset64(st.st_size, fd, 0);
|
|
if (!response)
|
|
return respond_oom(connection);
|
|
|
|
@@ -824,7 +824,7 @@ static int request_handler(
|
|
assert(method);
|
|
|
|
if (!streq(method, "GET"))
|
|
- return mhd_respond(connection, MHD_HTTP_METHOD_NOT_ACCEPTABLE,
|
|
+ return mhd_respond(connection, MHD_HTTP_NOT_ACCEPTABLE,
|
|
"Unsupported method.\n");
|
|
|
|
|
|
diff --git a/src/journal-remote/journal-remote.c b/src/journal-remote/journal-remote.c
|
|
index 431e283..476c826 100644
|
|
--- a/src/journal-remote/journal-remote.c
|
|
+++ b/src/journal-remote/journal-remote.c
|
|
@@ -526,13 +526,13 @@ static int process_http_upload(
|
|
log_warning("Failed to process data for connection %p", connection);
|
|
if (r == -ENOBUFS)
|
|
return mhd_respondf(connection,
|
|
- MHD_HTTP_REQUEST_ENTITY_TOO_LARGE,
|
|
+ MHD_HTTP_PAYLOAD_TOO_LARGE,
|
|
"Entry is too large, maximum is %u bytes.\n",
|
|
DATA_SIZE_MAX);
|
|
|
|
else if (r == -E2BIG)
|
|
return mhd_respondf(connection,
|
|
- MHD_HTTP_REQUEST_ENTITY_TOO_LARGE,
|
|
+ MHD_HTTP_PAYLOAD_TOO_LARGE,
|
|
"Entry with more fields than the maximum of %u\n",
|
|
ENTRY_FIELD_COUNT_MAX);
|
|
|
|
@@ -586,7 +586,7 @@ static int request_handler(
|
|
*connection_cls);
|
|
|
|
if (!streq(method, "POST"))
|
|
- return mhd_respond(connection, MHD_HTTP_METHOD_NOT_ACCEPTABLE,
|
|
+ return mhd_respond(connection, MHD_HTTP_NOT_ACCEPTABLE,
|
|
"Unsupported method.\n");
|
|
|
|
if (!streq(url, "/upload"))
|
|
--
|
|
1.8.3.1
|
|
|