1.1 --- a/test_files/programs/ls.c Thu May 09 16:47:08 2024 +0200
1.2 +++ b/test_files/programs/ls.c Thu May 09 17:07:06 2024 +0200
1.3 @@ -1,8 +1,7 @@
1.4 /*
1.5 - * List filesystem objects using the client library.
1.6 + * List filesystem objects using the standard C library.
1.7 *
1.8 - * Originally developed as fsaccess/op_list_objects.c, this should eventually
1.9 - * use C library functions instead of client library functions.
1.10 + * Originally developed as fsaccess/op_list_objects.c.
1.11 *
1.12 * Copyright (C) 2019, 2022, 2024 Paul Boddie <paul@boddie.org.uk>
1.13 *
1.14 @@ -32,7 +31,6 @@
1.15
1.16 #include <e2access/format.h> /* get_permission_string */
1.17 #include <e2access/path.h>
1.18 -#include <fsclient/client.h>
1.19 #include <systypes/format.h>
1.20
1.21 #define FMTnlinkd "%" pFMTnlink "d"
1.22 @@ -62,7 +60,7 @@
1.23
1.24 sprintf(path, "%s/%s", dirname, dirent->d_name);
1.25
1.26 - if (client_stat(path, &st))
1.27 + if (stat(path, &st))
1.28 return 1;
1.29
1.30 _show_object(dirent->d_name, &st);
1.31 @@ -78,7 +76,7 @@
1.32 DIR *dirp;
1.33 struct dirent *dirent;
1.34
1.35 - if (client_stat(path, &st))
1.36 + if (stat(path, &st))
1.37 return 1;
1.38
1.39 if (S_ISDIR(st.st_mode))
1.40 @@ -93,12 +91,7 @@
1.41 while ((dirent = readdir(dirp)) != NULL)
1.42 {
1.43 if (_show_dirent(path, dirent))
1.44 - {
1.45 - free(dirent);
1.46 return 1;
1.47 - }
1.48 -
1.49 - free(dirent);
1.50 }
1.51
1.52 closedir(dirp);