[BusyBox 0000534]: "mount -t auto " broken

bugs at busybox.net bugs at busybox.net
Thu Dec 15 10:55:13 UTC 2005


A NOTE has been added to this issue. 
====================================================================== 
http://busybox.net/bugs/view.php?id=534 
====================================================================== 
Reported By:                smiley73
Assigned To:                BusyBox
====================================================================== 
Project:                    BusyBox
Issue ID:                   534
Category:                   Other
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     assigned
====================================================================== 
Date Submitted:             11-05-2005 17:36 PST
Last Modified:              12-15-2005 02:55 PST
====================================================================== 
Summary:                    "mount -t auto " broken
Description: 
"mount -t auto" is broken. Mount returns the error message "no such device"
.
Not specifying "-t auto" at all or specifying the file system, i.e. "-t
ext2" works.

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

---------------------------------------------------------------------- 
 iggarpe - 12-15-05 02:25  
---------------------------------------------------------------------- 
The cause is that the standard C library getmntent will return "auto" as
the filesystem type, and the mount.c code incorrectly checks for a NULL
string:

if (fsType || ...

Should be:

if ((fsType && strcmp(fsType, "auto")) || ...

Trivial patch attached. 

---------------------------------------------------------------------- 
 iggarpe - 12-15-05 02:55  
---------------------------------------------------------------------- 
Please use the second patch. The first one is incorrect (could not find a
way to delete it). 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
11-05-05 17:36  smiley73       New Issue                                    
11-05-05 17:36  smiley73       Status                   new => assigned     
11-05-05 17:36  smiley73       Assigned To               => BusyBox         
11-25-05 10:17  iggarpe        Issue Monitored: iggarpe                     
11-25-05 10:18  iggarpe        Note Added: 0000696                          
11-28-05 00:17  iggarpe        File Added: mount-auto.diff                    
11-28-05 00:18  iggarpe        Note Deleted: 0000696                        
11-28-05 00:18  iggarpe        Note Added: 0000701                          
12-15-05 02:25  iggarpe        Note Added: 0000783                          
12-15-05 02:29  iggarpe        Note Deleted: 0000701                        
12-15-05 02:53  iggarpe        File Added: mount-auto-2.diff                    
12-15-05 02:55  iggarpe        Note Added: 0000784                          
======================================================================




More information about the busybox-cvs mailing list