From b138a3a01f797519d96af12f7e8ea2e3c6c9ad11 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Thu, 23 Nov 2017 23:04:49 +0000 Subject: [PATCH] du: 6502 support --- Applications/util/du.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Applications/util/du.c b/Applications/util/du.c index 5f505179..4d841ad7 100644 --- a/Applications/util/du.c +++ b/Applications/util/du.c @@ -129,7 +129,7 @@ long dodir(char *d, int thislev, dev_t dev) int maybe_print; struct stat s; long total; - DIR dir; + DIR *dir; struct dirent *entry; static char dent[LINELEN]; @@ -155,8 +155,8 @@ long dodir(char *d, int thislev, dev_t dev) * directory should not already have been done. */ maybe_print = !silent; - if (opendir_r(&dir, d) == NULL) break; - while ((entry = readdir(&dir)) != NULL) { + if (dir = opendir(d) == NULL) break; + while ((entry = readdir(dir)) != NULL) { if (strcmp(entry->d_name, ".") == 0 || strcmp(entry->d_name, "..") == 0) continue; @@ -164,7 +164,7 @@ long dodir(char *d, int thislev, dev_t dev) continue; total += dodir(dent, thislev - 1, s.st_dev); } - closedir_r(&dir); + closedir(dir); break; case S_IFBLK: -- 2.34.1