Skip to contentSkip to conversation

mount-2.11e bug ?

DISCUSSION J . A . Magallon 2 participants 2 messages Jul 26, 2001 – Jul 27, 2001

lore
Share & tools
lore
#0 lore raw

Hello...

Can anybody tell me if there was a bug in mount from util-linux-2.11e that could do things like this with new kernels:

/etc/fstab:
...
tmpfs /dev/shm tmpfs defaults,size=128M 0 0
...

werewolf:~/soft/util/util-linux-2.11e/mount# df
Filesystem           1k-blocks      Used Available Use% Mounted on
/dev/sda1               248895     83086    152959  36% /
/dev/sda2              3099292   2092872    848984  72% /usr
/dev/sda3              4095488   1603796   2283652  42% /home
/dev/sda5              1027768         8    975552   1% /toast
/home/soft/util/util-linux-2.11e/mount/tmpfs
                        131072         0    131072   0% /dev/shm

2.11h works ok.

TIA.

Signature · 4 lines
J.A. Magallon                           #  Let the source be with you...        
mailto:[email protected]
Mandrake Linux release 8.1 (Cooker) for i586
Linux werewolf 2.4.7-ac1 #1 SMP Thu Jul 26 19:53:39 CEST 2001 i686
#1 lore raw
Quoted 17 lines · J . A . Magallon

Can anybody tell me if there was a bug in mount from util-linux-2.11e that could do things like this with new kernels:

/etc/fstab:
...
tmpfs /dev/shm tmpfs defaults,size=128M 0 0
...

werewolf:~/soft/util/util-linux-2.11e/mount# df
Filesystem           1k-blocks      Used Available Use% Mounted on
/dev/sda1               248895     83086    152959  36% /
/dev/sda2              3099292   2092872    848984  72% /usr
/dev/sda3              4095488   1603796   2283652  42% /home
/dev/sda5              1027768         8    975552   1% /toast
/home/soft/util/util-linux-2.11e/mount/tmpfs
                        131072         0    131072   0% /dev/shm
Quoted 1 line

2.11h works ok.

Yes, there was.

Mount does a canonicalize() on the path names of device and mount point. Thus, tmpfs when your current directory is ~/soft/util/util-linux-2.11e/mount becomes /home/soft/util/util-linux-2.11e/mount/tmpfs.

However, this only happens when the thus obtained pathname points at an actual file. In a few mount versions the realpath() routine also did this when there is no such file.

Andries