]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
liblastlog2: fix error message in write_entry
authorWanBingjiang <wanbingjiang@webray.com.cn>
Mon, 30 Mar 2026 06:32:44 +0000 (14:32 +0800)
committerWanBingjiang <wanbingjiang@webray.com.cn>
Mon, 30 Mar 2026 06:32:49 +0000 (14:32 +0800)
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 <wanbingjiang@webray.com.cn>
liblastlog2/src/lastlog2.c

index 4e0c468eea975950f4f08099a4129b842f6f24cc..058e0d5aafc25046af8865c8a8591d525b8832b6 100644 (file)
@@ -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;
                        }