From 7a54596aafdce30702dd033b646b996f796044f3 Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Tue, 23 Apr 2019 17:24:53 +0200 Subject: [PATCH] tests: switch last-errno away from deprecated APIs This test only calls stat to check the failure on missing file, so switch to statns to get the same behaviour with a non-deprecated API. --- tests/c-api/test-last-errno.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/c-api/test-last-errno.c b/tests/c-api/test-last-errno.c index 9c5b2cf3a..056acd526 100644 --- a/tests/c-api/test-last-errno.c +++ b/tests/c-api/test-last-errno.c @@ -38,7 +38,7 @@ main (int argc, char *argv[]) { guestfs_h *g; int r, err; - struct guestfs_stat *stat; + struct guestfs_statns *stat; g = guestfs_create (); if (g == NULL) @@ -79,7 +79,7 @@ main (int argc, char *argv[]) if (guestfs_mount (g, "/dev/sda1", "/") == -1) exit (EXIT_FAILURE); - stat = guestfs_lstat (g, "/nosuchfile"); + stat = guestfs_lstatns (g, "/nosuchfile"); if (stat != NULL) error (EXIT_FAILURE, 0, "guestfs_lstat: expected error for missing file");