aboutsummaryrefslogtreecommitdiffstats
path: root/com32/rosh/rosh.c
diff options
context:
space:
mode:
authorLiu Aleaxander <Aleaxander@gmail.com>2009-08-11 17:18:38 +0800
committerLiu Aleaxander <Aleaxander@gmail.com>2009-08-11 17:18:38 +0800
commit37003eb7e984370fad9407ce5db341b720e9d4cd (patch)
treefc6cff05d96ec9bd4b154826ff7a791f517b3267 /com32/rosh/rosh.c
parentdb6bc6f4eb6a10fd4af96c5068d651ad4aca95aa (diff)
downloadsyslinux-37003eb7e984370fad9407ce5db341b720e9d4cd.tar.gz
syslinux-37003eb7e984370fad9407ce5db341b720e9d4cd.tar.xz
syslinux-37003eb7e984370fad9407ce5db341b720e9d4cd.zip
Core:SYSLINUX: make searchdir do work
well, still get lots of bugs, like when we execute dir /boot/syslinux in fact, it will list the file in /boot/ directory but not in /boot/syslinux/ Signed-off-by: Liu Aleaxander <Aleaxander@gmail.com>
Diffstat (limited to 'com32/rosh/rosh.c')
-rw-r--r--com32/rosh/rosh.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/com32/rosh/rosh.c b/com32/rosh/rosh.c
index fe37d727..631c780e 100644
--- a/com32/rosh/rosh.c
+++ b/com32/rosh/rosh.c
@@ -391,10 +391,10 @@ void rosh_dir_arg(const char *ifilstr, const char *pwdstr)
fd = open(filestr, O_RDONLY);
if (fd != -1) {
status = fstat(fd, &fdstat);
- if (S_ISDIR(fdstat.st_mode)) {
+ if (S_ISDIR(fdstat.st_mode)) {
ROSH_DEBUG("PATH '%s' is a directory\n", ifilstr);
d = fdopendir(fd);
- de = readdir(d);
+ de = readdir(d);
while (de != NULL) {
#ifdef DO_DEBUG
filestr2[0] = 0;
@@ -423,10 +423,10 @@ void rosh_dir_arg(const char *ifilstr, const char *pwdstr)
}
} else {
#ifdef __COM32__
- if (filestr[strlen(filestr) - 1] == SEP) {
+ if (filestr[strlen(filestr) - 1] == SEP) {
/* Directory */
filepos = 0;
- d = opendir(filestr);
+ d = opendir(filestr);
if (d != NULL) {
printf("DIR:'%s' %08x %8d\n", d->dd_name, d->dd_fd,
d->dd_sect);