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:
parent
307904234c
commit
78cfc9712b
5 changed files with 9 additions and 9 deletions
|
@ -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);
|
err = strerror(errno);
|
||||||
fprintf(stderr, "mount: Can't mount %s on %s: %s\n",
|
fprintf(stderr, "mount: Can't mount %s on %s: %s\n",
|
||||||
argv[1], argv[2], err);
|
argv[1], argv[2], err);
|
||||||
|
@ -153,7 +153,7 @@ mount_all()
|
||||||
if (!strcmp(device, "none"))
|
if (!strcmp(device, "none"))
|
||||||
device = NULL;
|
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) {
|
fs->fs_mntops) != 0) {
|
||||||
err = strerror(errno);
|
err = strerror(errno);
|
||||||
fprintf(stderr, "mount: Can't mount %s on %s: %s\n",
|
fprintf(stderr, "mount: Can't mount %s on %s: %s\n",
|
||||||
|
|
|
@ -47,7 +47,7 @@ char *argv[];
|
||||||
|
|
||||||
found = find_mtab_entry(name);
|
found = find_mtab_entry(name);
|
||||||
|
|
||||||
if (umount(name, umount_flags) < 0) {
|
if (minix_umount(name, umount_flags) < 0) {
|
||||||
if (errno == EINVAL)
|
if (errno == EINVAL)
|
||||||
std_err("umount: Device not mounted\n");
|
std_err("umount: Device not mounted\n");
|
||||||
else if (errno == ENOTBLK)
|
else if (errno == ENOTBLK)
|
||||||
|
|
|
@ -28,7 +28,7 @@ static int rs_down(char *label)
|
||||||
|
|
||||||
char *find_rslabel(char *args_line);
|
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)
|
char *type, char *args)
|
||||||
{
|
{
|
||||||
int r;
|
int r;
|
||||||
|
@ -165,7 +165,7 @@ int mount(char *special, char *name, int mountflags, int srvflags,
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
int umount(const char *name, int srvflags)
|
int minix_umount(const char *name, int srvflags)
|
||||||
{
|
{
|
||||||
char label[MNT_LABEL_LEN];
|
char label[MNT_LABEL_LEN];
|
||||||
message m;
|
message m;
|
||||||
|
|
|
@ -6,8 +6,8 @@ mount, umount \- mount or umount a file system
|
||||||
.nf
|
.nf
|
||||||
#include <sys/mount.h>
|
#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 minix_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_umount(char *\fIname\fP, int \fIsrvflags)
|
||||||
.fi
|
.fi
|
||||||
.ft P
|
.ft P
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
|
|
|
@ -480,7 +480,7 @@ int getfh(const char *, void *, size_t *)
|
||||||
#if !defined(__minix)
|
#if !defined(__minix)
|
||||||
int unmount(const char *, int);
|
int unmount(const char *, int);
|
||||||
#else
|
#else
|
||||||
int umount(const char *_name, int srvflags);
|
int minix_umount(const char *_name, int srvflags);
|
||||||
#endif /* !defined(__minix) */
|
#endif /* !defined(__minix) */
|
||||||
|
|
||||||
#if defined(_NETBSD_SOURCE)
|
#if defined(_NETBSD_SOURCE)
|
||||||
|
@ -488,7 +488,7 @@ int umount(const char *_name, int srvflags);
|
||||||
#if !defined(__minix)
|
#if !defined(__minix)
|
||||||
int mount(const char *, const char *, int, void *, size_t) __RENAME(__mount50);
|
int mount(const char *, const char *, int, void *, size_t) __RENAME(__mount50);
|
||||||
#else
|
#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);
|
char *args);
|
||||||
#endif /* !defined(__minix) */
|
#endif /* !defined(__minix) */
|
||||||
int fhopen(const void *, size_t, int) __RENAME(__fhopen40);
|
int fhopen(const void *, size_t, int) __RENAME(__fhopen40);
|
||||||
|
|
Loading…
Reference in a new issue