Bug 32499 - umount(2) man-page incorrectly says umount(block-dev) works (it doesn't)
umount(2) man-page incorrectly says umount(block-dev) works (it doesn't)
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: man-pages (Show other bugs)
7.1
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Trond Eivind Glomsrxd
Brock Organ
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-03-20 21:48 EST by Jay Turner
Modified: 2015-01-07 18:44 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-04-18 11:16:55 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
brief test-case source (657 bytes, text/plain)
2001-03-20 21:48 EST, Glen Foster
no flags Details

  None (edit)
Description Glen Foster 2001-03-20 21:48:02 EST
I found this while porting the VSX-PCTS to 7.1 with the 2.4 kernel:

#include <sys/mount.h>
{ blah, blah}
/* the mount(2) call works fine */
ret = mount("/dev/sda9", "/tmp/mnt", "ext2",  MS_MGC_VAL, (void *) &stuph);
/* the following umount(2) call fails */
ret = umount("/dev/sda9");
/* the following umount(2) call succeeds */
ret = umount("/tmp/mnt");

... tiny test-case included in case it helps.

Dunno if it's i386-only or not... mostly a nit since the user-space
commands work, but the man-page says differently:

MOUNT(2)            Linux Programmer's Manual            MOUNT(2)


NAME
       mount, umount - mount and unmount filesystems.

SYNOPSIS
       #include <sys/mount.h>

       int  mount(const char * specialfile, const char * dir,
       const char * filesystemtype, unsigned long rwflag, const
       void * data);

       int umount(const char *specialfile);

       int umount(const char *dir);
Comment 1 Glen Foster 2001-03-20 21:48:37 EST
Created attachment 13203 [details]
brief test-case source
Comment 2 Arjan van de Ven 2001-04-07 19:42:48 EDT
Not a bug.  What do you want to do when a single device has been
mounted in multiple places (legal under some circumstances, will
be more so in the future)?
Comment 3 Glen Foster 2001-04-08 09:22:53 EDT
I understand the logic of the code and the reasoning behind specifying the
*directory* instead of the block-device.  However, if you look at the man-page
versus what the code enforces, you will see a discrepancy.  I have NO issue with
umount requiring the directory-pathname as the arugment.  I do have a concern
that the man-page says you can use *either*.  Thus, there IS a bug, albeit a
low-weight one that I would like to see fixed at some point, but not necessary
for Florence.

I am re-opening this and changing the defect heading to reflect a man-page
error.  I also think it's a good idea to write a paragraph in the man-page that
says specifying the block-device form of the call is deprecated (because of
multiple mounts of the same device).
Comment 4 Arjan van de Ven 2001-04-18 11:16:50 EDT
$ rpm -qf /usr/share/man/man2/umount.2.gz
man-pages-1.35-5
---> re-assigning
Comment 5 Trond Eivind Glomsrxd 2001-04-18 15:15:41 EDT
Fixed in man-pages-1.35-6

Note You need to log in before you can comment on or make changes to this bug.