forked from KolibriOS/kolibrios
Magomed Kostoev (mkostoevr)
1f4d74f500
git-svn-id: svn://kolibrios.org@8622 a494cfbc-eb01-0410-851d-a64ba20cac60
21 lines
439 B
C
21 lines
439 B
C
#include <ksys.h>
|
|
#include <sys/dirent.h>
|
|
#include <stdlib.h>
|
|
|
|
int main(int argc, char** argv)
|
|
{
|
|
DIR *dir;
|
|
struct dirent *entry;
|
|
dir = opendir("/sys");
|
|
if (!dir) {
|
|
_ksys_debug_puts("diropen error!\n");
|
|
return 0;
|
|
};
|
|
while ((entry = readdir(dir)) != NULL) {
|
|
_ksys_debug_puts(entry->d_name);
|
|
_ksys_debug_putc('\n');
|
|
};
|
|
_ksys_debug_puts(itoa(telldir(dir)));
|
|
closedir(dir);
|
|
}
|