From: WanBingjiang Date: Mon, 30 Mar 2026 06:32:44 +0000 (+0800) Subject: liblastlog2: fix error message in write_entry X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=42e462dfe34037b63d20c38cb4e01d047f82683a;p=thirdparty%2Futil-linux.git liblastlog2: fix error message in write_entry Replace misleading "Delete statement failed" with "Failed to write entry" since write_entry uses REPLACE INTO for both insert and update. Signed-off-by: WanBingjiang --- diff --git a/liblastlog2/src/lastlog2.c b/liblastlog2/src/lastlog2.c index 4e0c468ee..058e0d5aa 100644 --- a/liblastlog2/src/lastlog2.c +++ b/liblastlog2/src/lastlog2.c @@ -310,11 +310,11 @@ write_entry(sqlite3 *db, const char *user, retval = -1; if (error) { if (step == SQLITE_ERROR) { - if (asprintf (error, "Delete statement failed: %s", + if (asprintf (error, "Failed to write entry: %s", sqlite3_errmsg (db)) < 0) retval = -ENOMEM; } else { - if (asprintf (error, "Delete statement did not return SQLITE_DONE: %d", + if (asprintf (error, "Write entry did not return SQLITE_DONE: %d", step) < 0) retval = -ENOMEM; }