#129550 glibc-doc: umount() description does not match real behaviour

#129550#5
Date:
2002-01-16 18:17:03 UTC
From:
To:
Hello,

the node "Mount-Unmount-Remount" of the libc info manual states

 - Function: int umount2 (const char *FILE, int FLAGS)
     `umount2' unmounts a filesystem.

     You can identify the filesystem to unmount either by the device
     special file that contains the filesystem or by the mount point.
     The effect is the same.  Specify either as the string FILE.

and later

 - Function: int umount (const char *FILE)
     `umount' does the same thing as `umount2' with FLAGS set to
     zeroes.  It is more widely available than `umount2' but since it
     lacks the possibility to forcefully unmount a filesystem is
     deprecated when `umount2' is also available.

This suggests that I could call umount("/dev/fd0") to unmount the
floppy disk device.  But when I try this, it does not work.  The call
fails with errno set to EINVAL.  It only works when I use the mount
point (instead of the device) as the FILE argument.

This coincides with the behaviour as documented in the umount(2)
manual page.  There I read

    EINVAL Specialfile had an invalid superblock.  Or, a remount was
	attempted, while specialfile was not already mounted on dir.
	Or, an umount was attempted, while dir was not a mount point.

which seems to indicate that, in fact, the argument to umount
must be the mount point and not the device.

Jochen

#129550#12
Date:
2002-12-27 17:10:19 UTC
From:
To:
tags 129550 + patch
thanks

Attached is a patch that re-words the description in the info file to
document the additional requirement that umount() can only take the mount
point, not the mount device, as argument.


T

#129550#19
Date:
2002-12-30 03:16:40 UTC
From:
To:
At Fri, 27 Dec 2002 12:10:19 -0500,
H. S. Teoh <hsteoh@quickfur.ath.cx> wrote:

Thanks for your patch.

BTW, from manpages umount(2):

HISTORY
       The  original  umount  function  was called as umount(device) and would
       return ENOTBLK when called with something other than  a  block  device.
       In  Linux  0.98p4  a  call  umount(dir)  was added, in order to support
       anonymous devices.  In Linux 2.3.99-pre7 the  call  umount(device)  was
       removed,  leaving only umount(dir) (since now devices can be mounted in
       more than one place, so specifying the device does not suffice).

So... this description is true after 2.4 iff its kernel is linux, if
this manpage is correct.  I think this description depends on your
kernel.  It's kernel issue, not glibc issue.  I wonder this bug has
the right point.

IMHO, this bug can be closed without any patches. I want more
suggestions about it.

Regards,
-- gotom

#129550#24
Date:
2002-12-31 14:10:56 UTC
From:
To:
[snip]
[snip]

Hmm. In this case, maybe the right thing to do would be to add a note to
the documentation stating that on some kernels, namely, Linux 2.4.x (or
more precisely, 2.3.99-pre7 and up), umount() requires its argument to be
the mount point.


T

#129550#29
Date:
2003-01-01 05:14:14 UTC
From:
To:
At Tue, 31 Dec 2002 09:10:56 -0500,
H. S. Teoh <hsteoh@quickfur.ath.cx> wrote:

Actually, glibc works not only on linux but also bsd/hurd/... and so
on.  Glibc info is written in non system specific style.  Glibc works
perfect - but kernel system call is rejected.  If we wrote each
architecture related issue, info needs more pages.

I don't know whether glibc maintainers think this description is
needed for umount() or not... It's only my opinion.  However, you can
grep libc info, and you find such system specific issue is not
addressed in this info.

From user's point of view, it's easy to find umount() behavior on
linux for convenience.  But umount() is system specific call, it's not
standardized, and exactly manpage says umount() changes.  Closing this
bug without your patch (sorry!) is more appropriate from maintainer's
point of view...  Do you think about it?

Regards,
-- gotom

#129550#34
Date:
2005-07-13 22:51:18 UTC
From:
To:
Hello,

just now I stumbled across this old bug report.
The issue was:
(1) the glibc manual states that umount("/dev/fd0") works, but
(2) in reality it does not.
I still think that this constitutes a bug either in the
C library or in the manual.

Otherwise, what would be the use of the manual if it does not
describe how things work?

All the best,
Jochen

#129550#45
Date:
2015-06-25 08:25:42 UTC
From:
To:
Sehr geehrter Käufer,

Sie haben eine nicht bezahlte Forderung beim Unternehmen Bank-Pay Co. KG. Das von Ihnen angegebene Konto ist nicht hinreichend gedeckt um die Abbuchung auszuführen.

Wir erwarten die Überweisung inklusive der Zusatzgebühren bis spätestens 30.06.2015 auf unser Bankkonto.

Aufgrund des bestehenden Zahlungsausstands sind Sie gebunden zuzüglich, die durch unsere Inanspruchnahme entstandenen Kosten von 83,38 Euro zu tragen. Namens und in Vollmacht unseren Mandanten Bank-Pay Co. KG fordern wir Sie auf, die noch offene Forderung sofort zu bezahlen. Bei Rückfragen oder Reklamationen erwarten wir eine Kontaktaufnahme innerhalb von 72 Stunden. Eine vollständige Kostenaufstellung, der Sie alle Buchungen entnehmen können, fügen wir bei. Nach Ablauf der festgelegten Frist wird die Angelegenheit dem Staatsanwalt und der SCHUFA übergeben.

Mit verbindlichen Grüßen

Abrechnung Cock Phil