[BusyBox 0001098]: ls cannot list /proc

bugs at busybox.net bugs at busybox.net
Tue Nov 21 19:32:54 UTC 2006


A NOTE has been added to this issue. 
====================================================================== 
http://busybox.net/bugs/view.php?id=1098 
====================================================================== 
Reported By:                ghost
Assigned To:                BusyBox
====================================================================== 
Project:                    BusyBox
Issue ID:                   1098
Category:                   Other
Reproducibility:            always
Severity:                   tweak
Priority:                   normal
Status:                     assigned
====================================================================== 
Date Submitted:             11-21-2006 07:47 PST
Last Modified:              11-21-2006 11:32 PST
====================================================================== 
Summary:                    ls cannot list /proc
Description: 
I have compiled the svn version (r16608)
mounted proc and try to list it with ls and with find:
$ cd proc
$ ls
$ 
$ find
.
./ibus
./crypto
./maps
./config.gz
./kallsyms
./iomem
./ioports
./cpu
./cpu/alignment
./scsi
./misc
./bus
./tty
./driver
./fs
./sys




====================================================================== 

---------------------------------------------------------------------- 
 vda - 11-21-06 11:32  
---------------------------------------------------------------------- 
Sorry. Patch is not in diff -u form, but it isn't the biggest problem.
Your code:

        while (1) {
                char *fullname;
                FILE *fd = NULL;
                entry = NULL;
                entry = readdir(dir);
                if(!entry) break;
                fd = fopen("/dev/null", "r");
                if (fd) {
                        fprintf(fd, "%s", entry->d_name);
                        fclose(fd);
                }

I would like to know what are you actually trying to do here? Do you
really need those back-to-back assignments? a=b; a=c; - ??! I find it hard
to believe that you need that.

I would also appreciate strace of the failing ls run, and of patched one. 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
11-21-06 07:47  ghost          New Issue                                    
11-21-06 07:47  ghost          Status                   new => assigned     
11-21-06 07:47  ghost          Assigned To               => BusyBox         
11-21-06 07:47  ghost          File Added: .config                          
11-21-06 08:06  ghost          Issue Monitored: ghost                       
11-21-06 11:32  vda            Note Added: 0001762                          
======================================================================




More information about the busybox-cvs mailing list