Prefix libc (u)mount with minix_

The goal is to prevent a name collision with the expected mount/umount
function signatures, if we decide one day to allow any application
using those to work on MINIX.

At this moment the caller has to start the required services, but if we
implement that logic inside the mount/unmout function, this would allow
any application to call those function successfully.

By renaming those now, we prevent a possible ABI break in the future.

Change-Id: Iaf6a9472bca0dda6bfe634bdb6029b3aa2e1ea3b
This commit is contained in:
Lionel Sambuc 2014-03-17 14:01:22 +01:00
parent 307904234c
commit 78cfc9712b
5 changed files with 9 additions and 9 deletions

View file

@ -76,7 +76,7 @@ char *argv[];
}
}
if (mount(device, argv[2], mountflags, srvflags, type, args) < 0) {
if (minix_mount(device, argv[2], mountflags, srvflags, type, args) < 0) {
err = strerror(errno);
fprintf(stderr, "mount: Can't mount %s on %s: %s\n",
argv[1], argv[2], err);
@ -153,7 +153,7 @@ mount_all()
if (!strcmp(device, "none"))
device = NULL;
if (mount(device, mountpoint, mountflags, 0, fs->fs_vfstype,
if (minix_mount(device, mountpoint, mountflags, 0, fs->fs_vfstype,
fs->fs_mntops) != 0) {
err = strerror(errno);
fprintf(stderr, "mount: Can't mount %s on %s: %s\n",

View file

@ -47,7 +47,7 @@ char *argv[];
found = find_mtab_entry(name);
if (umount(name, umount_flags) < 0) {
if (minix_umount(name, umount_flags) < 0) {
if (errno == EINVAL)
std_err("umount: Device not mounted\n");
else if (errno == ENOTBLK)

View file

@ -28,7 +28,7 @@ static int rs_down(char *label)
char *find_rslabel(char *args_line);
int mount(char *special, char *name, int mountflags, int srvflags,
int minix_mount(char *special, char *name, int mountflags, int srvflags,
char *type, char *args)
{
int r;
@ -165,7 +165,7 @@ int mount(char *special, char *name, int mountflags, int srvflags,
return r;
}
int umount(const char *name, int srvflags)
int minix_umount(const char *name, int srvflags)
{
char label[MNT_LABEL_LEN];
message m;

View file

@ -6,8 +6,8 @@ mount, umount \- mount or umount a file system
.nf
#include <sys/mount.h>
int mount(char *\fIspecial\fP, char *\fIname\fP, int \fImountflags\fP, int \fIsrvflags\fP, char *\fItype\fP, char *\fIargs\fP)
int umount(char *\fIname\fP, int \fIsrvflags)
int minix_mount(char *\fIspecial\fP, char *\fIname\fP, int \fImountflags\fP, int \fIsrvflags\fP, char *\fItype\fP, char *\fIargs\fP)
int minix_umount(char *\fIname\fP, int \fIsrvflags)
.fi
.ft P
.SH DESCRIPTION

View file

@ -480,7 +480,7 @@ int getfh(const char *, void *, size_t *)
#if !defined(__minix)
int unmount(const char *, int);
#else
int umount(const char *_name, int srvflags);
int minix_umount(const char *_name, int srvflags);
#endif /* !defined(__minix) */
#if defined(_NETBSD_SOURCE)
@ -488,7 +488,7 @@ int umount(const char *_name, int srvflags);
#if !defined(__minix)
int mount(const char *, const char *, int, void *, size_t) __RENAME(__mount50);
#else
int mount(char *_spec, char *_name, int _mountflags, int srvflags, char *type,
int minix_mount(char *_spec, char *_name, int _mountflags, int srvflags, char *type,
char *args);
#endif /* !defined(__minix) */
int fhopen(const void *, size_t, int) __RENAME(__fhopen40);